[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 42/61] hw/display: Use memory_region_init_rom() with read-only reg
From: |
Paolo Bonzini |
Subject: |
[PULL 42/61] hw/display: Use memory_region_init_rom() with read-only regions |
Date: |
Mon, 16 Mar 2020 22:27:09 +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/display/cg3.c | 5 ++---
hw/display/tcx.c | 5 ++---
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/hw/display/cg3.c b/hw/display/cg3.c
index 4fb67c6..a1ede10 100644
--- a/hw/display/cg3.c
+++ b/hw/display/cg3.c
@@ -287,9 +287,8 @@ static void cg3_initfn(Object *obj)
SysBusDevice *sbd = SYS_BUS_DEVICE(obj);
CG3State *s = CG3(obj);
- memory_region_init_ram_nomigrate(&s->rom, obj, "cg3.prom",
FCODE_MAX_ROM_SIZE,
- &error_fatal);
- memory_region_set_readonly(&s->rom, true);
+ memory_region_init_rom_nomigrate(&s->rom, obj, "cg3.prom",
+ FCODE_MAX_ROM_SIZE, &error_fatal);
sysbus_init_mmio(sbd, &s->rom);
memory_region_init_io(&s->reg, obj, &cg3_reg_ops, s, "cg3.reg",
diff --git a/hw/display/tcx.c b/hw/display/tcx.c
index ca458f9..76de16e 100644
--- a/hw/display/tcx.c
+++ b/hw/display/tcx.c
@@ -755,9 +755,8 @@ static void tcx_initfn(Object *obj)
SysBusDevice *sbd = SYS_BUS_DEVICE(obj);
TCXState *s = TCX(obj);
- memory_region_init_ram_nomigrate(&s->rom, obj, "tcx.prom",
FCODE_MAX_ROM_SIZE,
- &error_fatal);
- memory_region_set_readonly(&s->rom, true);
+ memory_region_init_rom_nomigrate(&s->rom, obj, "tcx.prom",
+ FCODE_MAX_ROM_SIZE, &error_fatal);
sysbus_init_mmio(sbd, &s->rom);
/* 2/STIP : Stippler */
--
1.8.3.1
- [PULL 26/61] hw/audio/intel-hda: Use memory region alias to reduce .rodata by 4.34MB, (continued)
- [PULL 26/61] hw/audio/intel-hda: Use memory region alias to reduce .rodata by 4.34MB, Paolo Bonzini, 2020/03/16
- [PULL 27/61] hw/usb/quirks: Use smaller types to reduce .rodata by 10KiB, Paolo Bonzini, 2020/03/16
- [PULL 28/61] ui/curses: Make control_characters[] array const, Paolo Bonzini, 2020/03/16
- [PULL 32/61] Use -isystem for linux-headers dir, Paolo Bonzini, 2020/03/16
- [PULL 29/61] ui/curses: Move arrays to .heap to save 74KiB of .bss, Paolo Bonzini, 2020/03/16
- [PULL 31/61] softmmu/vl.c: Handle '-cpu help' and '-device help' before 'no default machine', Paolo Bonzini, 2020/03/16
- [PULL 33/61] exec/rom_reset: Free rom data during inmigrate skip, Paolo Bonzini, 2020/03/16
- [PULL 36/61] lockable: add QemuRecMutex support, Paolo Bonzini, 2020/03/16
- [PULL 40/61] scripts/cocci: Patch to replace memory_region_init_{ram, readonly -> rom}, Paolo Bonzini, 2020/03/16
- [PULL 35/61] lockable: add lock guards, Paolo Bonzini, 2020/03/16
- [PULL 42/61] hw/display: Use memory_region_init_rom() with read-only regions,
Paolo Bonzini <=
- [PULL 30/61] qemu-cpu-models.rst: Document -noTSX, mds-no, taa-no, and tsx-ctrl, Paolo Bonzini, 2020/03/16
- [PULL 34/61] cpus: avoid pause_all_vcpus getting stuck due to race, Paolo Bonzini, 2020/03/16
- [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