[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v6 19/26] exec: Delete DEVICE_HOST_ENDIAN
From: |
tony.nguyen |
Subject: |
[Qemu-devel] [PATCH v6 19/26] exec: Delete DEVICE_HOST_ENDIAN |
Date: |
Wed, 7 Aug 2019 08:32:51 +0000 |
DEVICE_HOST_ENDIAN is conditional upon HOST_WORDS_BIGENDIAN.
Code is cleaner if the single use of DEVICE_HOST_ENDIAN is instead
directly conditional upon HOST_WORDS_BIGENDIAN.
Signed-off-by: Tony Nguyen <address@hidden>
---
include/exec/cpu-common.h | 8 --------
memory.c | 6 +++++-
2 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h
index 7eeb78c..b33dc0c 100644
--- a/include/exec/cpu-common.h
+++ b/include/exec/cpu-common.h
@@ -16,14 +16,6 @@ void tcg_flush_softmmu_tlb(CPUState *cs);
#if !defined(CONFIG_USER_ONLY)
-#include "exec/memop.h"
-
-#if defined(HOST_WORDS_BIGENDIAN)
-#define DEVICE_HOST_ENDIAN MO_BE
-#else
-#define DEVICE_HOST_ENDIAN MO_LE
-#endif
-
/* address in the RAM (different from a physical address) */
#if defined(CONFIG_XEN_BACKEND)
typedef uint64_t ram_addr_t;
diff --git a/memory.c b/memory.c
index 3cabb52..11db6ec 100644
--- a/memory.c
+++ b/memory.c
@@ -1362,7 +1362,11 @@ static void memory_region_ram_device_write(void *opaque,
hwaddr addr,
static const MemoryRegionOps ram_device_mem_ops = {
.read = memory_region_ram_device_read,
.write = memory_region_ram_device_write,
- .endianness = DEVICE_HOST_ENDIAN,
+#if defined(HOST_WORDS_BIGENDIAN)
+ .endianness = MO_BE,
+#else
+ .endianness = MO_LE,
+#endif
.valid = {
.min_access_size = 1,
.max_access_size = 8,
--
1.8.3.1
?
- [Qemu-devel] [PATCH v6 13/26] target/mips: Hard code size with MO_{8|16|32|64}, (continued)
- [Qemu-devel] [PATCH v6 13/26] target/mips: Hard code size with MO_{8|16|32|64}, tony.nguyen, 2019/08/07
- [Qemu-devel] [PATCH v6 14/26] exec: Hard code size with MO_{8|16|32|64}, tony.nguyen, 2019/08/07
- [Qemu-devel] [PATCH v6 16/26] exec: Map device_endian onto MemOp, tony.nguyen, 2019/08/07
- [Qemu-devel] [PATCH v6 18/26] exec: Delete device_endian, tony.nguyen, 2019/08/07
- [Qemu-devel] [PATCH v6 19/26] exec: Delete DEVICE_HOST_ENDIAN,
tony.nguyen <=
- [Qemu-devel] [PATCH v6 15/26] build: Correct non-common common-obj-* to obj-*, tony.nguyen, 2019/08/07
- [Qemu-devel] [PATCH v6 20/26] memory: Access MemoryRegion with endianness, tony.nguyen, 2019/08/07
- [Qemu-devel] [PATCH v6 23/26] cpu: TLB_FLAGS_MASK bit to force memory slow path, tony.nguyen, 2019/08/07