[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 8/9] exec: Delete DEVICE_HOST_ENDIAN
From: |
Tony Nguyen |
Subject: |
[Qemu-devel] [PATCH 8/9] exec: Delete DEVICE_HOST_ENDIAN |
Date: |
Sat, 24 Aug 2019 05:42:47 +1000 |
Simplify code with MemOp short hand for host endianness, 0.
typedef enum MemOp {
/* snip */
#ifdef HOST_WORDS_BIGENDIAN
MO_LE = MO_BSWAP,
MO_BE = 0,
#else
MO_LE = 0,
MO_BE = MO_BSWAP,
#endif
/* snip */
};
Signed-off-by: Tony Nguyen <address@hidden>
---
include/exec/cpu-common.h | 8 --------
memory.c | 2 +-
2 files changed, 1 insertion(+), 9 deletions(-)
diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h
index 7eeb78c48b..b33dc0c9f5 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 d78d6e46db..ee7559a18c 100644
--- a/memory.c
+++ b/memory.c
@@ -1353,7 +1353,7 @@ 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,
+ .endianness = 0, /* Host endianness */
.valid = {
.min_access_size = 1,
.max_access_size = 8,
--
2.23.0
- [Qemu-devel] [PATCH 0/9] Delete enum device_endian, Tony Nguyen, 2019/08/23
- [Qemu-devel] [PATCH 1/9] exec: Map device_endian onto MemOp, Tony Nguyen, 2019/08/23
- [Qemu-devel] [PATCH 2/9] exec: Replace DEVICE_NATIVE_ENDIAN with MO_TE, Tony Nguyen, 2019/08/23
- [Qemu-devel] [PATCH 4/9] exec: Replace DEVICE_BIG_ENDIAN with MO_BE, Tony Nguyen, 2019/08/23
- [Qemu-devel] [PATCH 5/9] exec: Replace enum device_endian with MemOp, Tony Nguyen, 2019/08/23
- [Qemu-devel] [PATCH 6/9] memory: Delete devend_memop, Tony Nguyen, 2019/08/23
- [Qemu-devel] [PATCH 7/9] exec: Delete device_endian, Tony Nguyen, 2019/08/23
- [Qemu-devel] [PATCH 8/9] exec: Delete DEVICE_HOST_ENDIAN,
Tony Nguyen <=
- [Qemu-devel] [PATCH 3/9] exec: Replace DEVICE_LITTLE_ENDIAN with MO_LE, Tony Nguyen, 2019/08/23
- [Qemu-devel] [PATCH 9/9] memory: Delete memory_region_big_endian, Tony Nguyen, 2019/08/23