mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
include/exec/memory: move devend functions to memory-internal.h
Only system/physmem.c and system/memory.c use those functions, so we can move then to internal header. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-ID: <20250317183417.285700-17-pierrick.bouvier@linaro.org>
This commit is contained in:
parent
5519a52c0c
commit
a54240931c
2 changed files with 19 additions and 18 deletions
|
@ -43,5 +43,24 @@ void address_space_dispatch_free(AddressSpaceDispatch *d);
|
|||
|
||||
void mtree_print_dispatch(struct AddressSpaceDispatch *d,
|
||||
MemoryRegion *root);
|
||||
|
||||
/* 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();
|
||||
}
|
||||
return end == DEVICE_BIG_ENDIAN;
|
||||
}
|
||||
|
||||
/* enum device_endian to MemOp. */
|
||||
static inline MemOp devend_memop(enum device_endian end)
|
||||
{
|
||||
return devend_big_endian(end) ? MO_BE : MO_LE;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -3138,24 +3138,6 @@ address_space_write_cached(MemoryRegionCache *cache, hwaddr addr,
|
|||
MemTxResult address_space_set(AddressSpace *as, hwaddr addr,
|
||||
uint8_t c, hwaddr len, MemTxAttrs attrs);
|
||||
|
||||
/* 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();
|
||||
}
|
||||
return end == DEVICE_BIG_ENDIAN;
|
||||
}
|
||||
|
||||
/* enum device_endian to MemOp. */
|
||||
static inline MemOp devend_memop(enum device_endian end)
|
||||
{
|
||||
return devend_big_endian(end) ? MO_BE : MO_LE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Inhibit technologies that require discarding of pages in RAM blocks, e.g.,
|
||||
* to manage the actual amount of memory consumed by the VM (then, the memory
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue