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-alpha | |
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-alpha')
-rw-r--r-- | target-alpha/cpu-qom.h | 41 | ||||
-rw-r--r-- | target-alpha/cpu.c | 1 | ||||
-rw-r--r-- | target-alpha/cpu.h | 44 | ||||
-rw-r--r-- | target-alpha/fpu_helper.c | 1 | ||||
-rw-r--r-- | target-alpha/gdbstub.c | 1 | ||||
-rw-r--r-- | target-alpha/helper.c | 1 | ||||
-rw-r--r-- | target-alpha/int_helper.c | 1 | ||||
-rw-r--r-- | target-alpha/machine.c | 3 | ||||
-rw-r--r-- | target-alpha/mem_helper.c | 1 | ||||
-rw-r--r-- | target-alpha/sys_helper.c | 1 | ||||
-rw-r--r-- | target-alpha/translate.c | 1 | ||||
-rw-r--r-- | target-alpha/vax_helper.c | 1 |
12 files changed, 54 insertions, 43 deletions
diff --git a/target-alpha/cpu-qom.h b/target-alpha/cpu-qom.h index b01c6c82eb..bae4945344 100644 --- a/target-alpha/cpu-qom.h +++ b/target-alpha/cpu-qom.h @@ -21,7 +21,6 @@ #define QEMU_ALPHA_CPU_QOM_H #include "qom/cpu.h" -#include "cpu.h" #define TYPE_ALPHA_CPU "alpha-cpu" @@ -48,44 +47,6 @@ typedef struct AlphaCPUClass { void (*parent_reset)(CPUState *cpu); } AlphaCPUClass; -/** - * AlphaCPU: - * @env: #CPUAlphaState - * - * An Alpha CPU. - */ -typedef struct AlphaCPU { - /*< private >*/ - CPUState parent_obj; - /*< public >*/ - - CPUAlphaState env; - - /* This alarm doesn't exist in real hardware; we wish it did. */ - QEMUTimer *alarm_timer; -} AlphaCPU; - -static inline AlphaCPU *alpha_env_get_cpu(CPUAlphaState *env) -{ - return container_of(env, AlphaCPU, env); -} - -#define ENV_GET_CPU(e) CPU(alpha_env_get_cpu(e)) - -#define ENV_OFFSET offsetof(AlphaCPU, env) - -#ifndef CONFIG_USER_ONLY -extern const struct VMStateDescription vmstate_alpha_cpu; -#endif - -void alpha_cpu_do_interrupt(CPUState *cpu); -bool alpha_cpu_exec_interrupt(CPUState *cpu, int int_req); -void alpha_cpu_dump_state(CPUState *cs, FILE *f, fprintf_function cpu_fprintf, - int flags); -hwaddr alpha_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr); -int alpha_cpu_gdb_read_register(CPUState *cpu, uint8_t *buf, int reg); -int alpha_cpu_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg); -void alpha_cpu_do_unaligned_access(CPUState *cpu, vaddr addr, - int is_write, int is_user, uintptr_t retaddr); +typedef struct AlphaCPU AlphaCPU; #endif diff --git a/target-alpha/cpu.c b/target-alpha/cpu.c index 8a155cae90..6d01d7f75e 100644 --- a/target-alpha/cpu.c +++ b/target-alpha/cpu.c @@ -24,6 +24,7 @@ #include "cpu.h" #include "qemu-common.h" #include "migration/vmstate.h" +#include "exec/exec-all.h" static void alpha_cpu_set_pc(CPUState *cs, vaddr value) diff --git a/target-alpha/cpu.h b/target-alpha/cpu.h index b25d7d09d0..e71ea70ea1 100644 --- a/target-alpha/cpu.h +++ b/target-alpha/cpu.h @@ -21,6 +21,7 @@ #define __CPU_ALPHA_H__ #include "qemu-common.h" +#include "cpu-qom.h" #define TARGET_LONG_BITS 64 #define ALIGNED_ONLY @@ -284,12 +285,51 @@ struct CPUAlphaState { int implver; }; +/** + * AlphaCPU: + * @env: #CPUAlphaState + * + * An Alpha CPU. + */ +struct AlphaCPU { + /*< private >*/ + CPUState parent_obj; + /*< public >*/ + + CPUAlphaState env; + + /* This alarm doesn't exist in real hardware; we wish it did. */ + QEMUTimer *alarm_timer; +}; + +static inline AlphaCPU *alpha_env_get_cpu(CPUAlphaState *env) +{ + return container_of(env, AlphaCPU, env); +} + +#define ENV_GET_CPU(e) CPU(alpha_env_get_cpu(e)) + +#define ENV_OFFSET offsetof(AlphaCPU, env) + +#ifndef CONFIG_USER_ONLY +extern const struct VMStateDescription vmstate_alpha_cpu; +#endif + +void alpha_cpu_do_interrupt(CPUState *cpu); +bool alpha_cpu_exec_interrupt(CPUState *cpu, int int_req); +void alpha_cpu_dump_state(CPUState *cs, FILE *f, fprintf_function cpu_fprintf, + int flags); +hwaddr alpha_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr); +int alpha_cpu_gdb_read_register(CPUState *cpu, uint8_t *buf, int reg); +int alpha_cpu_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg); +void alpha_cpu_do_unaligned_access(CPUState *cpu, vaddr addr, + int is_write, int is_user, uintptr_t retaddr); + #define cpu_list alpha_cpu_list #define cpu_exec cpu_alpha_exec #define cpu_signal_handler cpu_alpha_signal_handler #include "exec/cpu-all.h" -#include "cpu-qom.h" enum { FEATURE_ASN = 0x00000001, @@ -485,6 +525,4 @@ static inline void cpu_get_tb_cpu_state(CPUAlphaState *env, target_ulong *pc, *pflags = flags; } -#include "exec/exec-all.h" - #endif /* !defined (__CPU_ALPHA_H__) */ diff --git a/target-alpha/fpu_helper.c b/target-alpha/fpu_helper.c index 5ab7d5e64d..9645978aaa 100644 --- a/target-alpha/fpu_helper.c +++ b/target-alpha/fpu_helper.c @@ -19,6 +19,7 @@ #include "qemu/osdep.h" #include "cpu.h" +#include "exec/exec-all.h" #include "exec/helper-proto.h" #include "fpu/softfloat.h" diff --git a/target-alpha/gdbstub.c b/target-alpha/gdbstub.c index 199f028425..d64bcccfa0 100644 --- a/target-alpha/gdbstub.c +++ b/target-alpha/gdbstub.c @@ -19,6 +19,7 @@ */ #include "qemu/osdep.h" #include "qemu-common.h" +#include "cpu.h" #include "exec/gdbstub.h" int alpha_cpu_gdb_read_register(CPUState *cs, uint8_t *mem_buf, int n) diff --git a/target-alpha/helper.c b/target-alpha/helper.c index 6dec2639b1..85168b7ed1 100644 --- a/target-alpha/helper.c +++ b/target-alpha/helper.c @@ -20,6 +20,7 @@ #include "qemu/osdep.h" #include "cpu.h" +#include "exec/exec-all.h" #include "fpu/softfloat.h" #include "exec/helper-proto.h" diff --git a/target-alpha/int_helper.c b/target-alpha/int_helper.c index 777e48d084..19bebfe742 100644 --- a/target-alpha/int_helper.c +++ b/target-alpha/int_helper.c @@ -19,6 +19,7 @@ #include "qemu/osdep.h" #include "cpu.h" +#include "exec/exec-all.h" #include "exec/helper-proto.h" #include "qemu/host-utils.h" diff --git a/target-alpha/machine.c b/target-alpha/machine.c index 9ab092852a..710b7835b4 100644 --- a/target-alpha/machine.c +++ b/target-alpha/machine.c @@ -1,6 +1,9 @@ #include "qemu/osdep.h" +#include "qemu-common.h" +#include "cpu.h" #include "hw/hw.h" #include "hw/boards.h" +#include "migration/cpu.h" static int get_fpcr(QEMUFile *f, void *opaque, size_t size) { diff --git a/target-alpha/mem_helper.c b/target-alpha/mem_helper.c index 7fee9a6e2b..7f4d15fef2 100644 --- a/target-alpha/mem_helper.c +++ b/target-alpha/mem_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" /* Softmmu support */ diff --git a/target-alpha/sys_helper.c b/target-alpha/sys_helper.c index e2dec15b60..bec1e178be 100644 --- a/target-alpha/sys_helper.c +++ b/target-alpha/sys_helper.c @@ -19,6 +19,7 @@ #include "qemu/osdep.h" #include "cpu.h" +#include "exec/exec-all.h" #include "exec/helper-proto.h" #include "sysemu/sysemu.h" #include "qemu/timer.h" diff --git a/target-alpha/translate.c b/target-alpha/translate.c index 8c2183a418..76dab154ee 100644 --- a/target-alpha/translate.c +++ b/target-alpha/translate.c @@ -21,6 +21,7 @@ #include "cpu.h" #include "disas/disas.h" #include "qemu/host-utils.h" +#include "exec/exec-all.h" #include "tcg-op.h" #include "exec/cpu_ldst.h" diff --git a/target-alpha/vax_helper.c b/target-alpha/vax_helper.c index e74ac3e042..2b0c178274 100644 --- a/target-alpha/vax_helper.c +++ b/target-alpha/vax_helper.c @@ -19,6 +19,7 @@ #include "qemu/osdep.h" #include "cpu.h" +#include "exec/exec-all.h" #include "exec/helper-proto.h" #include "fpu/softfloat.h" |