mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 18:23:57 -06:00
target: Move ArchCPUClass definition to 'cpu.h'
The OBJECT_DECLARE_CPU_TYPE() macro forward-declares each ArchCPUClass type. These forward declarations are sufficient for code in hw/ to use the QOM definitions. No need to expose these structure definitions. Keep each local to their target/ by moving them to the corresponding "cpu.h" header. Suggested-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20231013140116.255-13-philmd@linaro.org>
This commit is contained in:
parent
c61b18a5d0
commit
9348028e7e
37 changed files with 287 additions and 335 deletions
|
@ -21,7 +21,6 @@
|
|||
#define QEMU_S390_CPU_QOM_H
|
||||
|
||||
#include "hw/core/cpu.h"
|
||||
#include "qom/object.h"
|
||||
|
||||
#define TYPE_S390_CPU "s390x-cpu"
|
||||
|
||||
|
@ -30,38 +29,4 @@ OBJECT_DECLARE_CPU_TYPE(S390CPU, S390CPUClass, S390_CPU)
|
|||
#define S390_CPU_TYPE_SUFFIX "-" TYPE_S390_CPU
|
||||
#define S390_CPU_TYPE_NAME(name) (name S390_CPU_TYPE_SUFFIX)
|
||||
|
||||
typedef struct S390CPUModel S390CPUModel;
|
||||
typedef struct S390CPUDef S390CPUDef;
|
||||
|
||||
typedef enum cpu_reset_type {
|
||||
S390_CPU_RESET_NORMAL,
|
||||
S390_CPU_RESET_INITIAL,
|
||||
S390_CPU_RESET_CLEAR,
|
||||
} cpu_reset_type;
|
||||
|
||||
/**
|
||||
* S390CPUClass:
|
||||
* @parent_realize: The parent class' realize handler.
|
||||
* @parent_reset: The parent class' reset handler.
|
||||
* @load_normal: Performs a load normal.
|
||||
* @cpu_reset: Performs a CPU reset.
|
||||
* @initial_cpu_reset: Performs an initial CPU reset.
|
||||
*
|
||||
* An S/390 CPU model.
|
||||
*/
|
||||
struct S390CPUClass {
|
||||
CPUClass parent_class;
|
||||
|
||||
const S390CPUDef *cpu_def;
|
||||
bool kvm_required;
|
||||
bool is_static;
|
||||
bool is_migration_safe;
|
||||
const char *desc;
|
||||
|
||||
DeviceRealize parent_realize;
|
||||
DeviceReset parent_reset;
|
||||
void (*load_normal)(CPUState *cpu);
|
||||
void (*reset)(CPUState *cpu, cpu_reset_type type);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue