[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 55/61] hw/dma: Let devices own the MemoryRegion they create
From: |
Paolo Bonzini |
Subject: |
[PULL 55/61] hw/dma: Let devices own the MemoryRegion they create |
Date: |
Mon, 16 Mar 2020 22:27:22 +0100 |
From: Philippe Mathieu-Daudé <address@hidden>
Avoid orphan memory regions being added in the /unattached QOM
container.
This commit was produced with the Coccinelle script
scripts/coccinelle/memory-region-housekeeping.cocci.
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
hw/dma/i8257.c | 2 +-
hw/dma/rc4030.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/dma/i8257.c b/hw/dma/i8257.c
index bad8deb..ef15c06 100644
--- a/hw/dma/i8257.c
+++ b/hw/dma/i8257.c
@@ -553,7 +553,7 @@ static void i8257_realize(DeviceState *dev, Error **errp)
I8257State *d = I8257(dev);
int i;
- memory_region_init_io(&d->channel_io, NULL, &channel_io_ops, d,
+ memory_region_init_io(&d->channel_io, OBJECT(dev), &channel_io_ops, d,
"dma-chan", 8 << d->dshift);
memory_region_add_subregion(isa_address_space_io(isa),
d->base, &d->channel_io);
diff --git a/hw/dma/rc4030.c b/hw/dma/rc4030.c
index 21e2c36..7434d27 100644
--- a/hw/dma/rc4030.c
+++ b/hw/dma/rc4030.c
@@ -679,9 +679,9 @@ static void rc4030_realize(DeviceState *dev, Error **errp)
s->periodic_timer = timer_new_ns(QEMU_CLOCK_VIRTUAL,
rc4030_periodic_timer, s);
- memory_region_init_io(&s->iomem_chipset, NULL, &rc4030_ops, s,
+ memory_region_init_io(&s->iomem_chipset, o, &rc4030_ops, s,
"rc4030.chipset", 0x300);
- memory_region_init_io(&s->iomem_jazzio, NULL, &jazzio_ops, s,
+ memory_region_init_io(&s->iomem_jazzio, o, &jazzio_ops, s,
"rc4030.jazzio", 0x00001000);
memory_region_init_iommu(&s->dma_mr, sizeof(s->dma_mr),
--
1.8.3.1
- [PULL 46/61] hw/ppc: Use memory_region_init_rom() with read-only regions, (continued)
- [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, 2020/03/16
- [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 <=
- [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
- [PULL 59/61] hw/ppc/ppc405: Use memory_region_init_rom() with read-only regions, Paolo Bonzini, 2020/03/16
- [PULL 61/61] hw/arm: Let devices own the MemoryRegion they create, Paolo Bonzini, 2020/03/16
- Re: [PULL 00/61] Misc patches for soft freeze, no-reply, 2020/03/16
- Re: [PULL 00/61] Misc patches for soft freeze, no-reply, 2020/03/16