[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 38/52] cpu: move endian-dependent load/store function
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 38/52] cpu: move endian-dependent load/store functions to cpu-all.h |
Date: |
Thu, 19 May 2016 13:18:32 +0200 |
Disentangle cpu-common.h and memory.h from NEED_CPU_H. Prototypes are
not defined for !NEED_CPU_H, so remove them from poison.h too. Only
macros need poisoning.
Signed-off-by: Paolo Bonzini <address@hidden>
---
include/exec/cpu-all.h | 25 +++++++++++++++++++++++++
include/exec/cpu-common.h | 10 ----------
include/exec/memory.h | 17 -----------------
include/exec/poison.h | 8 --------
4 files changed, 25 insertions(+), 35 deletions(-)
diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h
index 08e5093..3911576 100644
--- a/include/exec/cpu-all.h
+++ b/include/exec/cpu-all.h
@@ -165,6 +165,31 @@ extern unsigned long reserved_va;
#define GUEST_ADDR_MAX (reserved_va ? reserved_va : \
(1ul << TARGET_VIRT_ADDR_SPACE_BITS) - 1)
+#else
+
+#include "exec/hwaddr.h"
+uint32_t lduw_phys(AddressSpace *as, hwaddr addr);
+uint32_t ldl_phys(AddressSpace *as, hwaddr addr);
+uint64_t ldq_phys(AddressSpace *as, hwaddr addr);
+void stl_phys_notdirty(AddressSpace *as, hwaddr addr, uint32_t val);
+void stw_phys(AddressSpace *as, hwaddr addr, uint32_t val);
+void stl_phys(AddressSpace *as, hwaddr addr, uint32_t val);
+void stq_phys(AddressSpace *as, hwaddr addr, uint64_t val);
+
+uint32_t address_space_lduw(AddressSpace *as, hwaddr addr,
+ MemTxAttrs attrs, MemTxResult *result);
+uint32_t address_space_ldl(AddressSpace *as, hwaddr addr,
+ MemTxAttrs attrs, MemTxResult *result);
+uint64_t address_space_ldq(AddressSpace *as, hwaddr addr,
+ MemTxAttrs attrs, MemTxResult *result);
+void address_space_stl_notdirty(AddressSpace *as, hwaddr addr, uint32_t val,
+ MemTxAttrs attrs, MemTxResult *result);
+void address_space_stw(AddressSpace *as, hwaddr addr, uint32_t val,
+ MemTxAttrs attrs, MemTxResult *result);
+void address_space_stl(AddressSpace *as, hwaddr addr, uint32_t val,
+ MemTxAttrs attrs, MemTxResult *result);
+void address_space_stq(AddressSpace *as, hwaddr addr, uint64_t val,
+ MemTxAttrs attrs, MemTxResult *result);
#endif
/* page related stuff */
diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h
index 4f59034..04eade5 100644
--- a/include/exec/cpu-common.h
+++ b/include/exec/cpu-common.h
@@ -109,16 +109,6 @@ void stl_be_phys(AddressSpace *as, hwaddr addr, uint32_t
val);
void stq_le_phys(AddressSpace *as, hwaddr addr, uint64_t val);
void stq_be_phys(AddressSpace *as, hwaddr addr, uint64_t val);
-#ifdef NEED_CPU_H
-uint32_t lduw_phys(AddressSpace *as, hwaddr addr);
-uint32_t ldl_phys(AddressSpace *as, hwaddr addr);
-uint64_t ldq_phys(AddressSpace *as, hwaddr addr);
-void stl_phys_notdirty(AddressSpace *as, hwaddr addr, uint32_t val);
-void stw_phys(AddressSpace *as, hwaddr addr, uint32_t val);
-void stl_phys(AddressSpace *as, hwaddr addr, uint32_t val);
-void stq_phys(AddressSpace *as, hwaddr addr, uint64_t val);
-#endif
-
void cpu_physical_memory_write_rom(AddressSpace *as, hwaddr addr,
const uint8_t *buf, int len);
void cpu_flush_icache_range(hwaddr start, int len);
diff --git a/include/exec/memory.h b/include/exec/memory.h
index e2a3e99..7fb9188 100644
--- a/include/exec/memory.h
+++ b/include/exec/memory.h
@@ -1292,23 +1292,6 @@ void address_space_stq_le(AddressSpace *as, hwaddr addr,
uint64_t val,
void address_space_stq_be(AddressSpace *as, hwaddr addr, uint64_t val,
MemTxAttrs attrs, MemTxResult *result);
-#ifdef NEED_CPU_H
-uint32_t address_space_lduw(AddressSpace *as, hwaddr addr,
- MemTxAttrs attrs, MemTxResult *result);
-uint32_t address_space_ldl(AddressSpace *as, hwaddr addr,
- MemTxAttrs attrs, MemTxResult *result);
-uint64_t address_space_ldq(AddressSpace *as, hwaddr addr,
- MemTxAttrs attrs, MemTxResult *result);
-void address_space_stl_notdirty(AddressSpace *as, hwaddr addr, uint32_t val,
- MemTxAttrs attrs, MemTxResult *result);
-void address_space_stw(AddressSpace *as, hwaddr addr, uint32_t val,
- MemTxAttrs attrs, MemTxResult *result);
-void address_space_stl(AddressSpace *as, hwaddr addr, uint32_t val,
- MemTxAttrs attrs, MemTxResult *result);
-void address_space_stq(AddressSpace *as, hwaddr addr, uint64_t val,
- MemTxAttrs attrs, MemTxResult *result);
-#endif
-
/* address_space_translate: translate an address range into an address space
* into a MemoryRegion and an address range into that section. Should be
* called from an RCU critical section, to avoid that the last reference
diff --git a/include/exec/poison.h b/include/exec/poison.h
index a4b1eca..3ca7929 100644
--- a/include/exec/poison.h
+++ b/include/exec/poison.h
@@ -37,14 +37,6 @@
#pragma GCC poison CPUArchState
-#pragma GCC poison lduw_phys
-#pragma GCC poison ldl_phys
-#pragma GCC poison ldq_phys
-#pragma GCC poison stl_phys_notdirty
-#pragma GCC poison stw_phys
-#pragma GCC poison stl_phys
-#pragma GCC poison stq_phys
-
#pragma GCC poison CPU_INTERRUPT_HARD
#pragma GCC poison CPU_INTERRUPT_EXITTB
#pragma GCC poison CPU_INTERRUPT_HALT
--
1.8.3.1
- [Qemu-devel] [PULL 42/52] dma: do not depend on kvm_enabled(), (continued)
- [Qemu-devel] [PULL 42/52] dma: do not depend on kvm_enabled(), Paolo Bonzini, 2016/05/19
- [Qemu-devel] [PULL 29/52] arm: remove useless cpu.h inclusion, Paolo Bonzini, 2016/05/19
- [Qemu-devel] [PULL 31/52] explicitly include hw/qdev-core.h, Paolo Bonzini, 2016/05/19
- [Qemu-devel] [PULL 46/52] arm: move arm_log_exception into .c file, Paolo Bonzini, 2016/05/19
- [Qemu-devel] [PULL 44/52] acpi: do not use TARGET_PAGE_SIZE, Paolo Bonzini, 2016/05/19
- [Qemu-devel] [PULL 45/52] qemu-common: push cpu.h inclusion out of qemu-common.h, Paolo Bonzini, 2016/05/19
- [Qemu-devel] [PULL 49/52] exec: extract exec/tb-context.h, Paolo Bonzini, 2016/05/19
- [Qemu-devel] [PULL 43/52] s390x: reorganize CSS bits between cpu.h and other headers, Paolo Bonzini, 2016/05/19
- [Qemu-devel] [PULL 41/52] gdbstub: remove unnecessary includes from gdbstub-xml.c, Paolo Bonzini, 2016/05/19
- [Qemu-devel] [PULL 40/52] qemu-common: stop including qemu/host-utils.h from qemu-common.h, Paolo Bonzini, 2016/05/19
- [Qemu-devel] [PULL 38/52] cpu: move endian-dependent load/store functions to cpu-all.h,
Paolo Bonzini <=
- [Qemu-devel] [PULL 51/52] hw: remove pio_addr_t, Paolo Bonzini, 2016/05/19
- [Qemu-devel] [PULL 39/52] qemu-common: stop including qemu/bswap.h from qemu-common.h, Paolo Bonzini, 2016/05/19
- [Qemu-devel] [PULL 48/52] hw: explicitly include qemu/log.h, Paolo Bonzini, 2016/05/19
- [Qemu-devel] [PULL 47/52] mips: move CP0 functions out of cpu.h, Paolo Bonzini, 2016/05/19
- [Qemu-devel] [PULL 52/52] hw: clean up hw/hw.h includes, Paolo Bonzini, 2016/05/19
- [Qemu-devel] [PULL 50/52] cpu: move exec-all.h inclusion out of cpu.h, Paolo Bonzini, 2016/05/19
- Re: [Qemu-devel] [PULL 00/52] NEED_CPU_H cleanups, Peter Maydell, 2016/05/19