mirror of
https://github.com/qemu/qemu.git
synced 2026-07-08 17:46:17 +00:00
system/memory: Constify various AddressSpace arguments (access)
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-6-philmd@oss.qualcomm.com>
This commit is contained in:
committed by
Philippe Mathieu-Daudé
parent
7c862a8a45
commit
47b23339a5
@@ -3416,7 +3416,7 @@ static MemTxResult flatview_read(FlatView *fv, hwaddr addr,
|
||||
mr_addr, l, mr);
|
||||
}
|
||||
|
||||
MemTxResult address_space_read_full(AddressSpace *as, hwaddr addr,
|
||||
MemTxResult address_space_read_full(const AddressSpace *as, hwaddr addr,
|
||||
MemTxAttrs attrs, void *buf, hwaddr len)
|
||||
{
|
||||
MemTxResult result = MEMTX_OK;
|
||||
@@ -3431,7 +3431,7 @@ MemTxResult address_space_read_full(AddressSpace *as, hwaddr addr,
|
||||
return result;
|
||||
}
|
||||
|
||||
MemTxResult address_space_write(AddressSpace *as, hwaddr addr,
|
||||
MemTxResult address_space_write(const AddressSpace *as, hwaddr addr,
|
||||
MemTxAttrs attrs,
|
||||
const void *buf, hwaddr len)
|
||||
{
|
||||
@@ -3447,8 +3447,9 @@ MemTxResult address_space_write(AddressSpace *as, hwaddr addr,
|
||||
return result;
|
||||
}
|
||||
|
||||
MemTxResult address_space_rw(AddressSpace *as, hwaddr addr, MemTxAttrs attrs,
|
||||
void *buf, hwaddr len, bool is_write)
|
||||
MemTxResult address_space_rw(const AddressSpace *as, hwaddr addr,
|
||||
MemTxAttrs attrs, void *buf,
|
||||
hwaddr len, bool is_write)
|
||||
{
|
||||
if (is_write) {
|
||||
return address_space_write(as, addr, attrs, buf, len);
|
||||
@@ -3457,7 +3458,7 @@ MemTxResult address_space_rw(AddressSpace *as, hwaddr addr, MemTxAttrs attrs,
|
||||
}
|
||||
}
|
||||
|
||||
MemTxResult address_space_set(AddressSpace *as, hwaddr addr,
|
||||
MemTxResult address_space_set(const AddressSpace *as, hwaddr addr,
|
||||
uint8_t c, hwaddr len, MemTxAttrs attrs)
|
||||
{
|
||||
#define FILLBUF_SIZE 512
|
||||
@@ -3514,7 +3515,8 @@ MemTxResult address_space_write_rom(AddressSpace *as, hwaddr addr,
|
||||
return MEMTX_OK;
|
||||
}
|
||||
|
||||
void address_space_flush_icache_range(AddressSpace *as, 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
|
||||
|
||||
Reference in New Issue
Block a user