mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -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
|
@ -22,7 +22,6 @@
|
|||
#define TARGET_AVR_CPU_QOM_H
|
||||
|
||||
#include "hw/core/cpu.h"
|
||||
#include "qom/object.h"
|
||||
|
||||
#define TYPE_AVR_CPU "avr-cpu"
|
||||
|
||||
|
@ -31,19 +30,4 @@ OBJECT_DECLARE_CPU_TYPE(AVRCPU, AVRCPUClass, AVR_CPU)
|
|||
#define AVR_CPU_TYPE_SUFFIX "-" TYPE_AVR_CPU
|
||||
#define AVR_CPU_TYPE_NAME(name) (name AVR_CPU_TYPE_SUFFIX)
|
||||
|
||||
/**
|
||||
* AVRCPUClass:
|
||||
* @parent_realize: The parent class' realize handler.
|
||||
* @parent_phases: The parent class' reset phase handlers.
|
||||
*
|
||||
* A AVR CPU model.
|
||||
*/
|
||||
struct AVRCPUClass {
|
||||
CPUClass parent_class;
|
||||
|
||||
DeviceRealize parent_realize;
|
||||
ResettablePhases parent_phases;
|
||||
};
|
||||
|
||||
|
||||
#endif /* TARGET_AVR_CPU_QOM_H */
|
||||
|
|
|
@ -147,6 +147,20 @@ struct ArchCPU {
|
|||
CPUAVRState env;
|
||||
};
|
||||
|
||||
/**
|
||||
* AVRCPUClass:
|
||||
* @parent_realize: The parent class' realize handler.
|
||||
* @parent_phases: The parent class' reset phase handlers.
|
||||
*
|
||||
* A AVR CPU model.
|
||||
*/
|
||||
struct AVRCPUClass {
|
||||
CPUClass parent_class;
|
||||
|
||||
DeviceRealize parent_realize;
|
||||
ResettablePhases parent_phases;
|
||||
};
|
||||
|
||||
extern const struct VMStateDescription vms_avr_cpu;
|
||||
|
||||
void avr_cpu_do_interrupt(CPUState *cpu);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue