system/memory: Constify various AddressSpace arguments (cache)
Mark the AddressSpace structure const when it is only accessed read-only. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20260616020359.18627-5-philmd@oss.qualcomm.com>
Philippe Mathieu-Daudé committed
Mar 19, 2026 at 13:31 UTC
7c862a8a457a323ed767ebd45b3f5d70a37bbf49
2 files changed
+2
-2
include/system/memory_cached.h
+1
-1
@@ -117,7 +117,7 @@ void address_space_stb_cached(MemoryRegionCache *cache,
117
* are relative to @addr.
118
*/
119
int64_t address_space_cache_init(MemoryRegionCache *cache,
120
- AddressSpace *as,
120
+ const AddressSpace *as,
121
hwaddr addr,
122
hwaddr len,
123
bool is_write);
system/physmem.c
+1
-1
@@ -3829,7 +3829,7 @@ void cpu_physical_memory_unmap(void *buffer, hwaddr len,
3829
#include "memory_ldst.c.inc"
3830
3831
int64_t address_space_cache_init(MemoryRegionCache *cache,
3832
- AddressSpace *as,
3832
+ const AddressSpace *as,
3833
hwaddr addr,
3834
hwaddr len,
3835
bool is_write)