[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 47/61] hw/riscv: Use memory_region_init_rom() with read-only regio
From: |
Paolo Bonzini |
Subject: |
[PULL 47/61] hw/riscv: Use memory_region_init_rom() with read-only regions |
Date: |
Mon, 16 Mar 2020 22:27:14 +0100 |
From: Philippe Mathieu-Daudé <address@hidden>
This commit was produced with the Coccinelle script
scripts/coccinelle/memory-region-housekeeping.cocci.
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
hw/riscv/sifive_e.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/hw/riscv/sifive_e.c b/hw/riscv/sifive_e.c
index a254cad..a1974ef 100644
--- a/hw/riscv/sifive_e.c
+++ b/hw/riscv/sifive_e.c
@@ -208,9 +208,8 @@ static void riscv_sifive_e_soc_realize(DeviceState *dev,
Error **errp)
memmap[SIFIVE_E_PWM2].base, memmap[SIFIVE_E_PWM2].size);
/* Flash memory */
- memory_region_init_ram(&s->xip_mem, NULL, "riscv.sifive.e.xip",
- memmap[SIFIVE_E_XIP].size, &error_fatal);
- memory_region_set_readonly(&s->xip_mem, true);
+ memory_region_init_rom(&s->xip_mem, NULL, "riscv.sifive.e.xip",
+ memmap[SIFIVE_E_XIP].size, &error_fatal);
memory_region_add_subregion(sys_mem, memmap[SIFIVE_E_XIP].base,
&s->xip_mem);
}
--
1.8.3.1
- [PULL 37/61] memory: Correctly return alias region type, (continued)
- [PULL 37/61] memory: Correctly return alias region type, Paolo Bonzini, 2020/03/16
- [PULL 38/61] memory: Simplify memory_region_init_rom_nomigrate() to ease review, Paolo Bonzini, 2020/03/16
- [PULL 39/61] scripts/cocci: Rename memory-region-{init-ram -> housekeeping}, Paolo Bonzini, 2020/03/16
- [PULL 41/61] hw/arm: Use memory_region_init_rom() with read-only regions, Paolo Bonzini, 2020/03/16
- [PULL 44/61] hw/net: Use memory_region_init_rom() with read-only regions, Paolo Bonzini, 2020/03/16
- [PULL 45/61] hw/pci-host: Use memory_region_init_rom() with read-only regions, Paolo Bonzini, 2020/03/16
- [PULL 46/61] hw/ppc: Use memory_region_init_rom() with read-only regions, Paolo Bonzini, 2020/03/16
- [PULL 43/61] hw/m68k: Use memory_region_init_rom() with read-only regions, Paolo Bonzini, 2020/03/16
- [PULL 48/61] hw/sh4: Use memory_region_init_rom() with read-only regions, Paolo Bonzini, 2020/03/16
- [PULL 50/61] scripts/cocci: Patch to detect potential use of memory_region_init_rom, Paolo Bonzini, 2020/03/16
- [PULL 47/61] hw/riscv: Use memory_region_init_rom() with read-only regions,
Paolo Bonzini <=
- [PULL 49/61] hw/sparc: Use memory_region_init_rom() with read-only regions, Paolo Bonzini, 2020/03/16
- [PULL 51/61] scripts/cocci: Patch to remove unnecessary memory_region_set_readonly(), Paolo Bonzini, 2020/03/16
- [PULL 52/61] scripts/cocci: Patch to let devices own their MemoryRegions, Paolo Bonzini, 2020/03/16
- [PULL 53/61] hw/core: Let devices own the MemoryRegion they create, Paolo Bonzini, 2020/03/16
- [PULL 54/61] hw/display: Let devices own the MemoryRegion they create, Paolo Bonzini, 2020/03/16
- [PULL 55/61] hw/dma: Let devices own the MemoryRegion they create, Paolo Bonzini, 2020/03/16
- [PULL 56/61] hw/riscv: Let devices own the MemoryRegion they create, Paolo Bonzini, 2020/03/16
- [PULL 57/61] hw/char: Let devices own the MemoryRegion they create, Paolo Bonzini, 2020/03/16
- [PULL 60/61] hw/arm: Remove unnecessary memory_region_set_readonly() on ROM alias, Paolo Bonzini, 2020/03/16
- [PULL 58/61] hw/arm/stm32: Use memory_region_init_rom() with read-only regions, Paolo Bonzini, 2020/03/16