Skip to content

Commit

Permalink
cpu: move exec-all.h inclusion out of cpu.h
Browse files Browse the repository at this point in the history
exec-all.h contains TCG-specific definitions.  It is not needed outside
TCG-specific files such as translate.c, exec.c or *helper.c.

One generic function had snuck into include/exec/exec-all.h; move it to
include/qom/cpu.h.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
  • Loading branch information
bonzini committed May 19, 2016
1 parent 00f6da6 commit 63c9155
Show file tree
Hide file tree
Showing 148 changed files with 148 additions and 42 deletions.
1 change: 1 addition & 0 deletions bsd-user/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "qemu/help_option.h"
/* For tb_lock */
#include "cpu.h"
#include "exec/exec-all.h"
#include "tcg.h"
#include "qemu/timer.h"
#include "qemu/envlist.h"
Expand Down
1 change: 1 addition & 0 deletions bsd-user/qemu.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@


#include "cpu.h"
#include "exec/exec-all.h"
#include "exec/cpu_ldst.h"

#undef DEBUG_REMAP
Expand Down
1 change: 1 addition & 0 deletions cpu-exec-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "qemu/osdep.h"
#include "cpu.h"
#include "sysemu/cpus.h"
#include "exec/exec-all.h"
#include "exec/memory-internal.h"

bool exit_request;
Expand Down
1 change: 1 addition & 0 deletions cpu-exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "cpu.h"
#include "trace.h"
#include "disas/disas.h"
#include "exec/exec-all.h"
#include "tcg.h"
#include "qemu/atomic.h"
#include "sysemu/qtest.h"
Expand Down
1 change: 1 addition & 0 deletions cpus.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include "sysemu/dma.h"
#include "sysemu/kvm.h"
#include "qmp-commands.h"
#include "exec/exec-all.h"

#include "qemu/thread.h"
#include "sysemu/cpus.h"
Expand Down
1 change: 1 addition & 0 deletions cputlb.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

#include "exec/memory-internal.h"
#include "exec/ram_addr.h"
#include "exec/exec-all.h"
#include "tcg/tcg.h"

/* DEBUG defines, enable DEBUG_TLB_LOG to log to the CPU_LOG_MMU target */
Expand Down
1 change: 1 addition & 0 deletions disas/tci.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "qemu/osdep.h"
#include "qemu-common.h"
#include "disas/bfd.h"
#include "exec/exec-all.h"
#include "tcg/tcg.h"

/* Disassemble TCI bytecode. */
Expand Down
1 change: 1 addition & 0 deletions exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

#include "qemu/cutils.h"
#include "cpu.h"
#include "exec/exec-all.h"
#include "tcg.h"
#include "hw/qdev-core.h"
#if !defined(CONFIG_USER_ONLY)
Expand Down
1 change: 1 addition & 0 deletions gdbstub.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include "qemu/sockets.h"
#include "sysemu/kvm.h"
#include "exec/semihost.h"
#include "exec/exec-all.h"

#ifdef CONFIG_USER_ONLY
#define GDB_ATTACHED "0"
Expand Down
1 change: 1 addition & 0 deletions hw/i386/kvmvapic.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "qemu/osdep.h"
#include "qemu-common.h"
#include "cpu.h"
#include "exec/exec-all.h"
#include "sysemu/sysemu.h"
#include "sysemu/cpus.h"
#include "sysemu/kvm.h"
Expand Down
1 change: 1 addition & 0 deletions hw/misc/mips_itu.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "qapi/error.h"
#include "cpu.h"
#include "qemu/log.h"
#include "exec/exec-all.h"
#include "hw/hw.h"
#include "hw/sysbus.h"
#include "sysemu/sysemu.h"
Expand Down
1 change: 1 addition & 0 deletions hw/ppc/spapr_hcall.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "sysemu/sysemu.h"
#include "qemu/log.h"
#include "cpu.h"
#include "exec/exec-all.h"
#include "helper_regs.h"
#include "hw/ppc/spapr.h"
#include "mmu-hash64.h"
Expand Down
1 change: 1 addition & 0 deletions hw/sh4/sh7750.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include "sh7750_regnames.h"
#include "hw/sh4/sh_intc.h"
#include "cpu.h"
#include "exec/exec-all.h"
#include "exec/address-spaces.h"

#define NB_DEVICES 4
Expand Down
9 changes: 0 additions & 9 deletions include/exec/exec-all.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,6 @@ void cpu_reloading_memory_map(void);
* Note that with KVM only one address space is supported.
*/
void cpu_address_space_init(CPUState *cpu, AddressSpace *as, int asidx);
/**
* cpu_get_address_space:
* @cpu: CPU to get address space from
* @asidx: index identifying which address space to get
*
* Return the requested address space of this CPU. @asidx
* specifies which address space to read.
*/
AddressSpace *cpu_get_address_space(CPUState *cpu, int asidx);
/* cputlb.c */
/**
* tlb_flush_page:
Expand Down
10 changes: 10 additions & 0 deletions include/qom/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -824,6 +824,16 @@ int cpu_watchpoint_remove(CPUState *cpu, vaddr addr,
void cpu_watchpoint_remove_by_ref(CPUState *cpu, CPUWatchpoint *watchpoint);
void cpu_watchpoint_remove_all(CPUState *cpu, int mask);

/**
* cpu_get_address_space:
* @cpu: CPU to get address space from
* @asidx: index identifying which address space to get
*
* Return the requested address space of this CPU. @asidx
* specifies which address space to read.
*/
AddressSpace *cpu_get_address_space(CPUState *cpu, int asidx);

void QEMU_NORETURN cpu_abort(CPUState *cpu, const char *fmt, ...)
GCC_FMT_ATTR(2, 3);
void cpu_exec_exit(CPUState *cpu);
Expand Down
1 change: 1 addition & 0 deletions linux-user/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include "qemu/cutils.h"
#include "qemu/help_option.h"
#include "cpu.h"
#include "exec/exec-all.h"
#include "tcg.h"
#include "qemu/timer.h"
#include "qemu/envlist.h"
Expand Down
1 change: 1 addition & 0 deletions linux-user/qemu.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@


#include "cpu.h"
#include "exec/exec-all.h"
#include "exec/cpu_ldst.h"

#undef DEBUG_REMAP
Expand Down
1 change: 1 addition & 0 deletions monitor.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
#include "trace/simple.h"
#endif
#include "exec/memory.h"
#include "exec/exec-all.h"
#include "qemu/log.h"
#include "qmp-commands.h"
#include "hmp.h"
Expand Down
1 change: 1 addition & 0 deletions target-alpha/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 0 additions & 2 deletions target-alpha/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -525,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__) */
1 change: 1 addition & 0 deletions target-alpha/fpu_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
1 change: 1 addition & 0 deletions target-alpha/helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
1 change: 1 addition & 0 deletions target-alpha/int_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
1 change: 1 addition & 0 deletions target-alpha/mem_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
1 change: 1 addition & 0 deletions target-alpha/sys_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions target-alpha/translate.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
1 change: 1 addition & 0 deletions target-alpha/vax_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
1 change: 1 addition & 0 deletions target-arm/arm-powerctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include "internals.h"
#include "arm-powerctl.h"
#include "qemu/log.h"
#include "exec/exec-all.h"

#ifndef DEBUG_ARM_POWERCTL
#define DEBUG_ARM_POWERCTL 0
Expand Down
1 change: 1 addition & 0 deletions target-arm/arm_ldst.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#ifndef ARM_LDST_H
#define ARM_LDST_H

#include "exec/exec-all.h"
#include "exec/cpu_ldst.h"
#include "qemu/bswap.h"

Expand Down
1 change: 1 addition & 0 deletions target-arm/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include "cpu.h"
#include "internals.h"
#include "qemu-common.h"
#include "exec/exec-all.h"
#include "hw/qdev-properties.h"
#if !defined(CONFIG_USER_ONLY)
#include "hw/loader.h"
Expand Down
2 changes: 0 additions & 2 deletions target-arm/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -2341,8 +2341,6 @@ static inline void cpu_get_tb_cpu_state(CPUARMState *env, target_ulong *pc,
*cs_base = 0;
}

#include "exec/exec-all.h"

enum {
QEMU_PSCI_CONDUIT_DISABLED = 0,
QEMU_PSCI_CONDUIT_SMC = 1,
Expand Down
1 change: 1 addition & 0 deletions target-arm/helper-a64.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "exec/gdbstub.h"
#include "exec/helper-proto.h"
#include "qemu/host-utils.h"
#include "qemu/log.h"
#include "sysemu/sysemu.h"
#include "qemu/bitops.h"
#include "internals.h"
Expand Down
1 change: 1 addition & 0 deletions target-arm/helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "sysemu/sysemu.h"
#include "qemu/bitops.h"
#include "qemu/crc32c.h"
#include "exec/exec-all.h"
#include "exec/cpu_ldst.h"
#include "arm_ldst.h"
#include <zlib.h> /* For crc32 */
Expand Down
1 change: 1 addition & 0 deletions target-arm/op_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "cpu.h"
#include "exec/helper-proto.h"
#include "internals.h"
#include "exec/exec-all.h"
#include "exec/cpu_ldst.h"

#define SIGNBIT (uint32_t)0x80000000
Expand Down
1 change: 1 addition & 0 deletions target-arm/psci.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <sysemu/sysemu.h>
#include "internals.h"
#include "arm-powerctl.h"
#include "exec/exec-all.h"

bool arm_is_psci_call(ARMCPU *cpu, int excp_type)
{
Expand Down
1 change: 1 addition & 0 deletions target-arm/translate-a64.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "qemu/osdep.h"

#include "cpu.h"
#include "exec/exec-all.h"
#include "tcg-op.h"
#include "qemu/log.h"
#include "arm_ldst.h"
Expand Down
1 change: 1 addition & 0 deletions target-arm/translate.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include "cpu.h"
#include "internals.h"
#include "disas/disas.h"
#include "exec/exec-all.h"
#include "tcg-op.h"
#include "qemu/log.h"
#include "qemu/bitops.h"
Expand Down
1 change: 1 addition & 0 deletions target-cris/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include "cpu.h"
#include "qemu-common.h"
#include "mmu.h"
#include "exec/exec-all.h"


static void cris_cpu_set_pc(CPUState *cs, vaddr value)
Expand Down
2 changes: 0 additions & 2 deletions target-cris/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,4 @@ static inline void cpu_get_tb_cpu_state(CPUCRISState *env, target_ulong *pc,
#define cpu_list cris_cpu_list
void cris_cpu_list(FILE *f, fprintf_function cpu_fprintf);

#include "exec/exec-all.h"

#endif
1 change: 1 addition & 0 deletions target-cris/helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "cpu.h"
#include "mmu.h"
#include "qemu/host-utils.h"
#include "exec/exec-all.h"
#include "exec/cpu_ldst.h"


Expand Down
1 change: 1 addition & 0 deletions target-cris/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

#include "qemu/osdep.h"
#include "cpu.h"
#include "exec/exec-all.h"
#include "mmu.h"

#ifdef DEBUG
Expand Down
1 change: 1 addition & 0 deletions target-cris/op_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include "mmu.h"
#include "exec/helper-proto.h"
#include "qemu/host-utils.h"
#include "exec/exec-all.h"
#include "exec/cpu_ldst.h"

//#define CRIS_OP_HELPER_DEBUG
Expand Down
1 change: 1 addition & 0 deletions target-cris/translate.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,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 "mmu.h"
Expand Down
1 change: 1 addition & 0 deletions target-i386/bpt_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

#include "qemu/osdep.h"
#include "cpu.h"
#include "exec/exec-all.h"
#include "exec/helper-proto.h"


Expand Down
1 change: 1 addition & 0 deletions target-i386/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "qemu/cutils.h"

#include "cpu.h"
#include "exec/exec-all.h"
#include "sysemu/kvm.h"
#include "sysemu/cpus.h"
#include "kvm_i386.h"
Expand Down
2 changes: 0 additions & 2 deletions target-i386/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -1362,8 +1362,6 @@ void tcg_x86_init(void);
#include "hw/i386/apic.h"
#endif

#include "exec/exec-all.h"

static inline void cpu_get_tb_cpu_state(CPUX86State *env, target_ulong *pc,
target_ulong *cs_base, uint32_t *flags)
{
Expand Down
1 change: 1 addition & 0 deletions target-i386/excp_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

#include "qemu/osdep.h"
#include "cpu.h"
#include "exec/exec-all.h"
#include "qemu/log.h"
#include "sysemu/sysemu.h"
#include "exec/helper-proto.h"
Expand Down
Loading

0 comments on commit 63c9155

Please sign in to comment.