aboutsummaryrefslogtreecommitdiff
path: root/target-sparc
diff options
context:
space:
mode:
Diffstat (limited to 'target-sparc')
-rw-r--r--target-sparc/cpu-qom.h38
-rw-r--r--target-sparc/cpu.c1
-rw-r--r--target-sparc/cpu.h40
-rw-r--r--target-sparc/gdbstub.c1
-rw-r--r--target-sparc/helper.c1
-rw-r--r--target-sparc/ldst_helper.c1
-rw-r--r--target-sparc/machine.c6
-rw-r--r--target-sparc/mmu_helper.c1
-rw-r--r--target-sparc/translate.c1
9 files changed, 50 insertions, 40 deletions
diff --git a/target-sparc/cpu-qom.h b/target-sparc/cpu-qom.h
index 5096b10472..f63af728ee 100644
--- a/target-sparc/cpu-qom.h
+++ b/target-sparc/cpu-qom.h
@@ -21,7 +21,6 @@
#define QEMU_SPARC_CPU_QOM_H
#include "qom/cpu.h"
-#include "cpu.h"
#ifdef TARGET_SPARC64
#define TYPE_SPARC_CPU "sparc64-cpu"
@@ -52,41 +51,6 @@ typedef struct SPARCCPUClass {
void (*parent_reset)(CPUState *cpu);
} SPARCCPUClass;
-/**
- * SPARCCPU:
- * @env: #CPUSPARCState
- *
- * A SPARC CPU.
- */
-typedef struct SPARCCPU {
- /*< private >*/
- CPUState parent_obj;
- /*< public >*/
-
- CPUSPARCState env;
-} SPARCCPU;
-
-static inline SPARCCPU *sparc_env_get_cpu(CPUSPARCState *env)
-{
- return container_of(env, SPARCCPU, env);
-}
-
-#define ENV_GET_CPU(e) CPU(sparc_env_get_cpu(e))
-
-#define ENV_OFFSET offsetof(SPARCCPU, env)
-
-#ifndef CONFIG_USER_ONLY
-extern const struct VMStateDescription vmstate_sparc_cpu;
-#endif
-
-void sparc_cpu_do_interrupt(CPUState *cpu);
-void sparc_cpu_dump_state(CPUState *cpu, FILE *f,
- fprintf_function cpu_fprintf, int flags);
-hwaddr sparc_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr);
-int sparc_cpu_gdb_read_register(CPUState *cpu, uint8_t *buf, int reg);
-int sparc_cpu_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg);
-void QEMU_NORETURN sparc_cpu_do_unaligned_access(CPUState *cpu,
- vaddr addr, int is_write,
- int is_user, uintptr_t retaddr);
+typedef struct SPARCCPU SPARCCPU;
#endif
diff --git a/target-sparc/cpu.c b/target-sparc/cpu.c
index fe4119e2bc..5b74cfcd31 100644
--- a/target-sparc/cpu.c
+++ b/target-sparc/cpu.c
@@ -21,6 +21,7 @@
#include "qapi/error.h"
#include "cpu.h"
#include "qemu/error-report.h"
+#include "exec/exec-all.h"
//#define DEBUG_FEATURES
diff --git a/target-sparc/cpu.h b/target-sparc/cpu.h
index 59ec7cafbe..ba37f4b94e 100644
--- a/target-sparc/cpu.h
+++ b/target-sparc/cpu.h
@@ -3,6 +3,7 @@
#include "qemu-common.h"
#include "qemu/bswap.h"
+#include "cpu-qom.h"
#define ALIGNED_ONLY
@@ -506,7 +507,42 @@ struct CPUSPARCState {
uint32_t cache_control;
};
-#include "cpu-qom.h"
+/**
+ * SPARCCPU:
+ * @env: #CPUSPARCState
+ *
+ * A SPARC CPU.
+ */
+struct SPARCCPU {
+ /*< private >*/
+ CPUState parent_obj;
+ /*< public >*/
+
+ CPUSPARCState env;
+};
+
+static inline SPARCCPU *sparc_env_get_cpu(CPUSPARCState *env)
+{
+ return container_of(env, SPARCCPU, env);
+}
+
+#define ENV_GET_CPU(e) CPU(sparc_env_get_cpu(e))
+
+#define ENV_OFFSET offsetof(SPARCCPU, env)
+
+#ifndef CONFIG_USER_ONLY
+extern const struct VMStateDescription vmstate_sparc_cpu;
+#endif
+
+void sparc_cpu_do_interrupt(CPUState *cpu);
+void sparc_cpu_dump_state(CPUState *cpu, FILE *f,
+ fprintf_function cpu_fprintf, int flags);
+hwaddr sparc_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr);
+int sparc_cpu_gdb_read_register(CPUState *cpu, uint8_t *buf, int reg);
+int sparc_cpu_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg);
+void QEMU_NORETURN sparc_cpu_do_unaligned_access(CPUState *cpu,
+ vaddr addr, int is_write,
+ int is_user, uintptr_t retaddr);
#ifndef NO_CPU_IO_DEFS
/* cpu_init.c */
@@ -732,6 +768,4 @@ static inline bool tb_am_enabled(int tb_flags)
#endif
}
-#include "exec/exec-all.h"
-
#endif
diff --git a/target-sparc/gdbstub.c b/target-sparc/gdbstub.c
index e530dc52f5..ffc2baa2e7 100644
--- a/target-sparc/gdbstub.c
+++ b/target-sparc/gdbstub.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
#include "qemu-common.h"
+#include "cpu.h"
#include "exec/gdbstub.h"
#ifdef TARGET_ABI32
diff --git a/target-sparc/helper.c b/target-sparc/helper.c
index 8349cbe2cc..bedc6722a1 100644
--- a/target-sparc/helper.c
+++ b/target-sparc/helper.c
@@ -19,6 +19,7 @@
#include "qemu/osdep.h"
#include "cpu.h"
+#include "exec/exec-all.h"
#include "qemu/host-utils.h"
#include "exec/helper-proto.h"
#include "sysemu/sysemu.h"
diff --git a/target-sparc/ldst_helper.c b/target-sparc/ldst_helper.c
index 658e7d8585..f73cf6deaa 100644
--- a/target-sparc/ldst_helper.c
+++ b/target-sparc/ldst_helper.c
@@ -20,6 +20,7 @@
#include "qemu/osdep.h"
#include "cpu.h"
#include "exec/helper-proto.h"
+#include "exec/exec-all.h"
#include "exec/cpu_ldst.h"
//#define DEBUG_MMU
diff --git a/target-sparc/machine.c b/target-sparc/machine.c
index 1046016f3a..59c92f7582 100644
--- a/target-sparc/machine.c
+++ b/target-sparc/machine.c
@@ -1,9 +1,15 @@
#include "qemu/osdep.h"
+#include "qemu-common.h"
+#include "cpu.h"
+#include "exec/exec-all.h"
#include "hw/hw.h"
#include "hw/boards.h"
#include "qemu/timer.h"
#include "cpu.h"
+#include "exec/exec-all.h"
+#include "migration/cpu.h"
+#include "exec/exec-all.h"
#ifdef TARGET_SPARC64
static const VMStateDescription vmstate_cpu_timer = {
diff --git a/target-sparc/mmu_helper.c b/target-sparc/mmu_helper.c
index aa80c4829b..32b629fb0d 100644
--- a/target-sparc/mmu_helper.c
+++ b/target-sparc/mmu_helper.c
@@ -19,6 +19,7 @@
#include "qemu/osdep.h"
#include "cpu.h"
+#include "exec/exec-all.h"
#include "trace.h"
#include "exec/address-spaces.h"
diff --git a/target-sparc/translate.c b/target-sparc/translate.c
index d154e3f7b6..21760b9fea 100644
--- a/target-sparc/translate.c
+++ b/target-sparc/translate.c
@@ -23,6 +23,7 @@
#include "cpu.h"
#include "disas/disas.h"
#include "exec/helper-proto.h"
+#include "exec/exec-all.h"
#include "tcg-op.h"
#include "exec/cpu_ldst.h"