diff options
| author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2025-09-29 15:40:33 +0200 |
|---|---|---|
| committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2025-10-07 03:37:04 +0200 |
| commit | c2cac27dba3db3348563154f9b4b436ecde7b09a (patch) | |
| tree | 1dd6bb9ca1601fd5b06e117094da089ad631b6c9 /system/physmem.c | |
| parent | ec1eb357cb86eee74d63940154db1e1bfa86026a (diff) | |
| download | focaccia-qemu-c2cac27dba3db3348563154f9b4b436ecde7b09a.tar.gz focaccia-qemu-c2cac27dba3db3348563154f9b4b436ecde7b09a.zip | |
system/physmem: Pass address space argument to cpu_flush_icache_range()
Rename cpu_flush_icache_range() as address_space_flush_icache_range(), passing an address space by argument. The single caller, rom_reset(), already operates on an address space. Use it. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20251002084203.63899-7-philmd@linaro.org>
Diffstat (limited to 'system/physmem.c')
| -rw-r--r-- | system/physmem.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/system/physmem.c b/system/physmem.c index c8a1fda55b..018b8f3157 100644 --- a/system/physmem.c +++ b/system/physmem.c @@ -3212,7 +3212,7 @@ MemTxResult address_space_write_rom(AddressSpace *as, hwaddr addr, return MEMTX_OK; } -void cpu_flush_icache_range(hwaddr addr, hwaddr len) +void address_space_flush_icache_range(AddressSpace *as, hwaddr addr, hwaddr len) { /* * This function should do the same thing as an icache flush that was @@ -3227,8 +3227,7 @@ void cpu_flush_icache_range(hwaddr addr, hwaddr len) RCU_READ_LOCK_GUARD(); while (len > 0) { hwaddr addr1, l = len; - MemoryRegion *mr = address_space_translate(&address_space_memory, - addr, &addr1, &l, true, + MemoryRegion *mr = address_space_translate(as, addr, &addr1, &l, true, MEMTXATTRS_UNSPECIFIED); if (!memory_region_supports_direct_access(mr)) { |