system/memory: Constify various AddressSpace arguments (checks)

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-2-philmd@oss.qualcomm.com>
This commit is contained in:
Philippe Mathieu-Daudé
2026-03-19 13:28:13 +01:00
committed by Philippe Mathieu-Daudé
parent 67cf90efc3
commit ff7ebb3d5e
2 changed files with 3 additions and 2 deletions

View File

@@ -2850,7 +2850,8 @@ static inline MemoryRegion *address_space_translate(AddressSpace *as,
* @is_write: indicates the transfer direction
* @attrs: memory attributes
*/
bool address_space_access_valid(AddressSpace *as, hwaddr addr, hwaddr len,
bool address_space_access_valid(const AddressSpace *as,
hwaddr addr, hwaddr len,
bool is_write, MemTxAttrs attrs);
/**

View File

@@ -3646,7 +3646,7 @@ static bool flatview_access_valid(FlatView *fv, hwaddr addr, hwaddr len,
return true;
}
bool address_space_access_valid(AddressSpace *as, hwaddr addr,
bool address_space_access_valid(const AddressSpace *as, hwaddr addr,
hwaddr len, bool is_write,
MemTxAttrs attrs)
{