system/memory: Remove DEVICE_HOST_ENDIAN definition
PATCH 1/1 system/memory: Remove DEVICE_HOST_ENDIAN definition
Since the previous commit ("exec/memory.h: make devend_memop "target defines" agnostic") there is a single use of the DEVICE_HOST_ENDIAN definition in ram_device_mem_ops: inline it and remove its definition altogether.
---
Based-on: <[email protected]>
--- include/exec/cpu-common.h | 6 ------ system/memory-internal.h | 3 --- system/memory.c | 2 +- 3 files changed, 1 insertion(+), 10 deletions(-)
include/exec/cpu-common.h +0 -6
@@ -44,12 +44,6 @@ enum device_endian { DEVICE_LITTLE_ENDIAN, }; -#if HOST_BIG_ENDIAN -#define DEVICE_HOST_ENDIAN DEVICE_BIG_ENDIAN -#else -#define DEVICE_HOST_ENDIAN DEVICE_LITTLE_ENDIAN -#endif -/* address in the RAM (different from a physical address) */ #if defined(CONFIG_XEN_BACKEND )typedef uint64_t ram_addr_t ;
system/memory-internal.h +0 -3
@@ -41,9 +41,6 @@ void mtree_print_dispatch(struct AddressSpaceDispatch *d,/* returns true if end is big endian. */ static inline bool devend_big_endian (enum device_endian end) { -QEMU_BUILD_BUG_ON (DEVICE_HOST_ENDIAN !=DEVICE_LITTLE_ENDIAN && -DEVICE_HOST_ENDIAN !=DEVICE_BIG_ENDIAN ); -if (end ==DEVICE_NATIVE_ENDIAN ) {return target_words_bigendian (); }
system/memory.c +1 -1
@@ -1382,7 +1382,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 =HOST_BIG_ENDIAN ?DEVICE_BIG_ENDIAN :DEVICE_LITTLE_ENDIAN , .valid = { .min_access_size =1 , .max_access_size =8 ,
Signature · 1 line
2.47.1
Quoted 7 lines · Philippe Mathieu-Daudé
Since the previous commit ("
exec/memory.h: makedevend_memop"target defines" agnostic") there is a single use of theDEVICE_HOST_ENDIANdefinition inram_device_mem_ops: inline it and remove its definition altogether.Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
Signature · 3 lines
Cheers, David / dhildenb
Quoted 5 lines · Philippe Mathieu-Daudé
Since the previous commit ("
exec/memory.h: makedevend_memop"target defines" agnostic") there is a single use of theDEVICE_HOST_ENDIANdefinition inram_device_mem_ops: inline it and remove its definition altogether.
Quoted 8 lines
Signed-off-by Philippe Mathieu-Daudé<[email protected]>---
Based-on:<[email protected]>--- include/exec/cpu-common.h | 6 ------ system/memory-internal.h | 3 --- system/memory.c | 2 +- 3 files changed, 1 insertion(+), 10 deletions(-)
r~
Quoted 5 lines · Philippe Mathieu-Daudé
Since the previous commit ("
exec/memory.h: makedevend_memop"target defines" agnostic") there is a single use of theDEVICE_HOST_ENDIANdefinition inram_device_mem_ops: inline it and remove its definition altogether.
Quoted 8 lines
Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
Based-on: <[email protected]>--- include/exec/cpu-common.h | 6 ------ system/memory-internal.h | 3 --- system/memory.c | 2 +- 3 files changed, 1 insertion(+), 10 deletions(-)
Patch queued.