diff options
| author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2025-09-30 10:14:35 +0200 |
|---|---|---|
| committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2025-10-07 05:03:56 +0200 |
| commit | 5b7502234c7ede51ab6e684b6abc64d5fee3c1a1 (patch) | |
| tree | 09687fa19141282645fff5c969e4d3696768f1b2 /system/physmem.c | |
| parent | be481476bae495191c1184b368531401a5584904 (diff) | |
| download | focaccia-qemu-5b7502234c7ede51ab6e684b6abc64d5fee3c1a1.tar.gz focaccia-qemu-5b7502234c7ede51ab6e684b6abc64d5fee3c1a1.zip | |
system/physmem: Avoid cpu_physical_memory_rw when is_write is constant
Following the mechanical changes of commit adeefe01671 ("Avoid
cpu_physical_memory_rw() with a constant is_write argument"),
replace:
- cpu_physical_memory_rw(, is_write=false) -> address_space_read()
- cpu_physical_memory_rw(, is_write=true) -> address_space_write()
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251002084203.63899-15-philmd@linaro.org>
Diffstat (limited to 'system/physmem.c')
| -rw-r--r-- | system/physmem.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/system/physmem.c b/system/physmem.c index 4dc66ac2c7..8d65b4c125 100644 --- a/system/physmem.c +++ b/system/physmem.c @@ -3188,12 +3188,14 @@ void cpu_physical_memory_rw(hwaddr addr, void *buf, void cpu_physical_memory_read(hwaddr addr, void *buf, hwaddr len) { - cpu_physical_memory_rw(addr, buf, len, false); + address_space_read(&address_space_memory, addr, + MEMTXATTRS_UNSPECIFIED, buf, len); } void cpu_physical_memory_write(hwaddr addr, const void *buf, hwaddr len) { - cpu_physical_memory_rw(addr, (void *)buf, len, true); + address_space_write(&address_space_memory, addr, + MEMTXATTRS_UNSPECIFIED, buf, len); } /* used for ROM loading : can write in RAM and ROM */ |