diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2016-05-19 15:55:08 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2016-05-19 15:55:08 +0100 |
commit | 776efef32439a31cb13a6acfe8aab833687745ad (patch) | |
tree | 8bb3579b495d9c5d19145041623dc10f6e2f8d18 /target-microblaze | |
parent | 8ec4fe0a4bed4fa27e6f28a746bcf77b27cd05a3 (diff) | |
parent | df43d49cb8708b9c88a20afe0d1a3089b550a5b8 (diff) |
Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging
NEED_CPU_H cleanups, big enough to deserve their own pull request.
# gpg: Signature made Thu 19 May 2016 15:42:37 BST using RSA key ID 78C7AE83
# gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>"
# gpg: aka "Paolo Bonzini <pbonzini@redhat.com>"
* remotes/bonzini/tags/for-upstream: (52 commits)
hw: clean up hw/hw.h includes
hw: remove pio_addr_t
cpu: move exec-all.h inclusion out of cpu.h
exec: extract exec/tb-context.h
hw: explicitly include qemu/log.h
mips: move CP0 functions out of cpu.h
arm: move arm_log_exception into .c file
qemu-common: push cpu.h inclusion out of qemu-common.h
acpi: do not use TARGET_PAGE_SIZE
s390x: reorganize CSS bits between cpu.h and other headers
dma: do not depend on kvm_enabled()
gdbstub: remove unnecessary includes from gdbstub-xml.c
qemu-common: stop including qemu/host-utils.h from qemu-common.h
qemu-common: stop including qemu/bswap.h from qemu-common.h
cpu: move endian-dependent load/store functions to cpu-all.h
hw: cannot include hw/hw.h from user emulation
hw: move CPU state serialization to migration/cpu.h
hw: do not use VMSTATE_*TL
include: poison symbols in osdep.h
apic: move target-dependent definitions to cpu.h
...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target-microblaze')
-rw-r--r-- | target-microblaze/cpu-qom.h | 44 | ||||
-rw-r--r-- | target-microblaze/cpu.c | 1 | ||||
-rw-r--r-- | target-microblaze/cpu.h | 47 | ||||
-rw-r--r-- | target-microblaze/gdbstub.c | 1 | ||||
-rw-r--r-- | target-microblaze/helper.c | 1 | ||||
-rw-r--r-- | target-microblaze/mmu.c | 1 | ||||
-rw-r--r-- | target-microblaze/op_helper.c | 1 | ||||
-rw-r--r-- | target-microblaze/translate.c | 1 |
8 files changed, 51 insertions, 46 deletions
diff --git a/target-microblaze/cpu-qom.h b/target-microblaze/cpu-qom.h index 34f6273ad1..1a61db77d0 100644 --- a/target-microblaze/cpu-qom.h +++ b/target-microblaze/cpu-qom.h @@ -47,48 +47,6 @@ typedef struct MicroBlazeCPUClass { void (*parent_reset)(CPUState *cpu); } MicroBlazeCPUClass; -/** - * MicroBlazeCPU: - * @env: #CPUMBState - * - * A MicroBlaze CPU. - */ -typedef struct MicroBlazeCPU { - /*< private >*/ - CPUState parent_obj; - - /*< public >*/ - - /* Microblaze Configuration Settings */ - struct { - bool stackprot; - uint32_t base_vectors; - uint8_t use_fpu; - bool use_mmu; - bool dcache_writeback; - bool endi; - char *version; - uint8_t pvr; - } cfg; - - CPUMBState env; -} MicroBlazeCPU; - -static inline MicroBlazeCPU *mb_env_get_cpu(CPUMBState *env) -{ - return container_of(env, MicroBlazeCPU, env); -} - -#define ENV_GET_CPU(e) CPU(mb_env_get_cpu(e)) - -#define ENV_OFFSET offsetof(MicroBlazeCPU, env) - -void mb_cpu_do_interrupt(CPUState *cs); -bool mb_cpu_exec_interrupt(CPUState *cs, int int_req); -void mb_cpu_dump_state(CPUState *cpu, FILE *f, fprintf_function cpu_fprintf, - int flags); -hwaddr mb_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr); -int mb_cpu_gdb_read_register(CPUState *cpu, uint8_t *buf, int reg); -int mb_cpu_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg); +typedef struct MicroBlazeCPU MicroBlazeCPU; #endif diff --git a/target-microblaze/cpu.c b/target-microblaze/cpu.c index fdfb01917f..8edc00a796 100644 --- a/target-microblaze/cpu.c +++ b/target-microblaze/cpu.c @@ -27,6 +27,7 @@ #include "qemu-common.h" #include "hw/qdev-properties.h" #include "migration/vmstate.h" +#include "exec/exec-all.h" static const struct { const char *name; diff --git a/target-microblaze/cpu.h b/target-microblaze/cpu.h index bf74e2c032..d17cf1e301 100644 --- a/target-microblaze/cpu.h +++ b/target-microblaze/cpu.h @@ -20,6 +20,7 @@ #define CPU_MICROBLAZE_H #include "qemu-common.h" +#include "cpu-qom.h" #define TARGET_LONG_BITS 32 @@ -274,7 +275,49 @@ struct CPUMBState { } pvr; }; -#include "cpu-qom.h" +/** + * MicroBlazeCPU: + * @env: #CPUMBState + * + * A MicroBlaze CPU. + */ +struct MicroBlazeCPU { + /*< private >*/ + CPUState parent_obj; + + /*< public >*/ + + /* Microblaze Configuration Settings */ + struct { + bool stackprot; + uint32_t base_vectors; + uint8_t use_fpu; + bool use_mmu; + bool dcache_writeback; + bool endi; + char *version; + uint8_t pvr; + } cfg; + + CPUMBState env; +}; + +static inline MicroBlazeCPU *mb_env_get_cpu(CPUMBState *env) +{ + return container_of(env, MicroBlazeCPU, env); +} + +#define ENV_GET_CPU(e) CPU(mb_env_get_cpu(e)) + +#define ENV_OFFSET offsetof(MicroBlazeCPU, env) + +void mb_cpu_do_interrupt(CPUState *cs); +bool mb_cpu_exec_interrupt(CPUState *cs, int int_req); +void mb_cpu_dump_state(CPUState *cpu, FILE *f, fprintf_function cpu_fprintf, + int flags); +hwaddr mb_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr); +int mb_cpu_gdb_read_register(CPUState *cpu, uint8_t *buf, int reg); +int mb_cpu_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg); void mb_tcg_init(void); MicroBlazeCPU *cpu_mb_init(const char *cpu_model); @@ -336,6 +379,4 @@ void mb_cpu_unassigned_access(CPUState *cpu, hwaddr addr, unsigned size); #endif -#include "exec/exec-all.h" - #endif diff --git a/target-microblaze/gdbstub.c b/target-microblaze/gdbstub.c index 89d38980bf..7fb076c2e9 100644 --- a/target-microblaze/gdbstub.c +++ b/target-microblaze/gdbstub.c @@ -19,6 +19,7 @@ */ #include "qemu/osdep.h" #include "qemu-common.h" +#include "cpu.h" #include "exec/gdbstub.h" int mb_cpu_gdb_read_register(CPUState *cs, uint8_t *mem_buf, int n) diff --git a/target-microblaze/helper.c b/target-microblaze/helper.c index 4de6bdbf83..da394d1dfc 100644 --- a/target-microblaze/helper.c +++ b/target-microblaze/helper.c @@ -20,6 +20,7 @@ #include "qemu/osdep.h" #include "cpu.h" +#include "exec/exec-all.h" #include "qemu/host-utils.h" #include "exec/log.h" diff --git a/target-microblaze/mmu.c b/target-microblaze/mmu.c index 4ac3040357..a22a496ebb 100644 --- a/target-microblaze/mmu.c +++ b/target-microblaze/mmu.c @@ -20,6 +20,7 @@ #include "qemu/osdep.h" #include "cpu.h" +#include "exec/exec-all.h" #define D(x) diff --git a/target-microblaze/op_helper.c b/target-microblaze/op_helper.c index 97333881f0..0533939389 100644 --- a/target-microblaze/op_helper.c +++ b/target-microblaze/op_helper.c @@ -22,6 +22,7 @@ #include "cpu.h" #include "exec/helper-proto.h" #include "qemu/host-utils.h" +#include "exec/exec-all.h" #include "exec/cpu_ldst.h" #define D(x) diff --git a/target-microblaze/translate.c b/target-microblaze/translate.c index a7a8ac8f99..513f390807 100644 --- a/target-microblaze/translate.c +++ b/target-microblaze/translate.c @@ -21,6 +21,7 @@ #include "qemu/osdep.h" #include "cpu.h" #include "disas/disas.h" +#include "exec/exec-all.h" #include "tcg-op.h" #include "exec/helper-proto.h" #include "microblaze-decode.h" |