aboutsummaryrefslogtreecommitdiff
path: root/target/cris
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2023-10-13 11:35:04 +0200
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2023-11-07 13:08:48 +0100
commit9348028e7ed089a1e9ed45091668c4c199e76fcd (patch)
tree1e275471acdaa8852e8c53672967acb07f74ec61 /target/cris
parentc61b18a5d0562851b933cd2fdc61cf21ea1be270 (diff)
downloadqemu-9348028e7ed089a1e9ed45091668c4c199e76fcd.zip
qemu-9348028e7ed089a1e9ed45091668c4c199e76fcd.tar.gz
qemu-9348028e7ed089a1e9ed45091668c4c199e76fcd.tar.bz2
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>
Diffstat (limited to 'target/cris')
-rw-r--r--target/cris/cpu-qom.h19
-rw-r--r--target/cris/cpu.h16
2 files changed, 16 insertions, 19 deletions
diff --git a/target/cris/cpu-qom.h b/target/cris/cpu-qom.h
index d7e5f33..741ca97 100644
--- a/target/cris/cpu-qom.h
+++ b/target/cris/cpu-qom.h
@@ -21,7 +21,6 @@
#define QEMU_CRIS_CPU_QOM_H
#include "hw/core/cpu.h"
-#include "qom/object.h"
#define TYPE_CRIS_CPU "cris-cpu"
@@ -30,22 +29,4 @@ OBJECT_DECLARE_CPU_TYPE(CRISCPU, CRISCPUClass, CRIS_CPU)
#define CRIS_CPU_TYPE_SUFFIX "-" TYPE_CRIS_CPU
#define CRIS_CPU_TYPE_NAME(name) (name CRIS_CPU_TYPE_SUFFIX)
-/**
- * CRISCPUClass:
- * @parent_realize: The parent class' realize handler.
- * @parent_phases: The parent class' reset phase handlers.
- * @vr: Version Register value.
- *
- * A CRIS CPU model.
- */
-struct CRISCPUClass {
- CPUClass parent_class;
-
- DeviceRealize parent_realize;
- ResettablePhases parent_phases;
-
- uint32_t vr;
-};
-
-
#endif
diff --git a/target/cris/cpu.h b/target/cris/cpu.h
index b821bb7..1be7f90 100644
--- a/target/cris/cpu.h
+++ b/target/cris/cpu.h
@@ -179,6 +179,22 @@ struct ArchCPU {
CPUCRISState env;
};
+/**
+ * CRISCPUClass:
+ * @parent_realize: The parent class' realize handler.
+ * @parent_phases: The parent class' reset phase handlers.
+ * @vr: Version Register value.
+ *
+ * A CRIS CPU model.
+ */
+struct CRISCPUClass {
+ CPUClass parent_class;
+
+ DeviceRealize parent_realize;
+ ResettablePhases parent_phases;
+
+ uint32_t vr;
+};
#ifndef CONFIG_USER_ONLY
extern const VMStateDescription vmstate_cris_cpu;