summaryrefslogtreecommitdiffstats
path: root/hw/nvram/spapr_nvram.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé2020-02-19 20:20:42 +0100
committerPhilippe Mathieu-Daudé2020-02-20 14:47:08 +0100
commit85eb7c18ee39e26002de6fa6abc5638af140e588 (patch)
tree70ed975b4a8b8a1bc36a2d5bcc0bf888227a2bc3 /hw/nvram/spapr_nvram.c
parentexec: Let cpu_[physical]_memory API use a boolean 'is_write' argument (diff)
downloadqemu-85eb7c18ee39e26002de6fa6abc5638af140e588.tar.gz
qemu-85eb7c18ee39e26002de6fa6abc5638af140e588.tar.xz
qemu-85eb7c18ee39e26002de6fa6abc5638af140e588.zip
Let cpu_[physical]_memory() calls pass a boolean 'is_write' argument
Use an explicit boolean type. This commit was produced with the included Coccinelle script scripts/coccinelle/exec_rw_const. Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Diffstat (limited to 'hw/nvram/spapr_nvram.c')
-rw-r--r--hw/nvram/spapr_nvram.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/nvram/spapr_nvram.c b/hw/nvram/spapr_nvram.c
index 877ddef7b9..15d08281d4 100644
--- a/hw/nvram/spapr_nvram.c
+++ b/hw/nvram/spapr_nvram.c
@@ -89,7 +89,7 @@ static void rtas_nvram_fetch(PowerPCCPU *cpu, SpaprMachineState *spapr,
assert(nvram->buf);
- membuf = cpu_physical_memory_map(buffer, &len, 1);
+ membuf = cpu_physical_memory_map(buffer, &len, true);
memcpy(membuf, nvram->buf + offset, len);
cpu_physical_memory_unmap(membuf, len, 1, len);
@@ -127,7 +127,7 @@ static void rtas_nvram_store(PowerPCCPU *cpu, SpaprMachineState *spapr,
return;
}
- membuf = cpu_physical_memory_map(buffer, &len, 0);
+ membuf = cpu_physical_memory_map(buffer, &len, false);
alen = len;
if (nvram->blk) {