[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2 14/17] system/physmem: Un-inline cpu_physical_memory_read/write()
On 30/9/25 09:23, Philippe Mathieu-Daudé wrote: On 30/9/25 07:02, Thomas Huth wrote:On 30/09/2025 06.13, Philippe Mathieu-Daudé wrote:Un-inline cpu_physical_memory_read() and cpu_physical_memory_write().What's the reasoning for this patch?Remove cpu_physical_memory_rw() in the next patch without having to inline the address_space_read/address_space_write() calls in "exec/cpu-common.h". Maybe better squashing both together? That would be: -- >8 -- diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h index 6c7d84aacb4..910e1c2afb9 100644 --- a/include/exec/cpu-common.h +++ b/include/exec/cpu-common.h @@ -131,18 +131,8 @@ void cpu_address_space_init(CPUState *cpu, int asidx, */ void cpu_address_space_destroy(CPUState *cpu, int asidx); -void cpu_physical_memory_rw(hwaddr addr, void *buf, - hwaddr len, bool is_write); -static inline void cpu_physical_memory_read(hwaddr addr, - void *buf, hwaddr len) -{ - cpu_physical_memory_rw(addr, buf, len, false); -} -static inline void cpu_physical_memory_write(hwaddr addr, - const void *buf, hwaddr len) -{ - cpu_physical_memory_rw(addr, (void *)buf, len, true); -} +void cpu_physical_memory_read(hwaddr addr, void *buf, hwaddr len); +void cpu_physical_memory_write(hwaddr addr, const void *buf, hwaddr len); void *cpu_physical_memory_map(hwaddr addr, hwaddr *plen, bool is_write); diff --git a/system/physmem.c b/system/physmem.c index 70b02675b93..a654b2af2a3 100644 --- a/system/physmem.c +++ b/system/physmem.c@@ -3181,11 +3181,16 @@ MemTxResult address_space_set(AddressSpace *as, hwaddr addr, return error; } -void cpu_physical_memory_rw(hwaddr addr, void *buf, - hwaddr len, bool is_write) +void cpu_physical_memory_read(hwaddr addr, void *buf, hwaddr len) { - address_space_rw(&address_space_memory, addr, MEMTXATTRS_UNSPECIFIED, - buf, len, is_write); + address_space_read(&address_space_memory, addr, + MEMTXATTRS_UNSPECIFIED, buf, len); +} + +void cpu_physical_memory_write(hwaddr addr, const void *buf, hwaddr len) +{ + address_space_write(&address_space_memory, addr, + MEMTXATTRS_UNSPECIFIED, buf, len); } /* used for ROM loading : can write in RAM and ROM */ ---
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |