[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 10/24] macio: Delete unused "macio-gpio" devices
From: |
Markus Armbruster |
Subject: |
[PATCH v3 10/24] macio: Delete unused "macio-gpio" devices |
Date: |
Tue, 9 Jun 2020 14:23:25 +0200 |
These devices go with the "via-pmu" device, which is controlled by
property "has-pmu". macio_newworld_init() creates it unconditionally,
because the property has not been set then. macio_newworld_realize()
realizes it only when the property is true. Works, although it can
leave an unrealized device hanging around in the QOM composition tree.
Affects machine mac99 with via=cuda (default).
Delete the unused device by making macio_newworld_realize() unparent
it. Visible in "info qom-tree":
/machine (mac99-machine)
[...]
/unattached (container)
/device[9] (macio-newworld)
[...]
/escc-legacy-port[8] (qemu:memory-region)
/escc-legacy-port[9] (qemu:memory-region)
/escc-legacy[0] (qemu:memory-region)
- /gpio (macio-gpio)
- /gpio[0] (qemu:memory-region)
/ide[0] (macio-ide)
/ide.0 (IDE)
/pmac-ide[0] (qemu:memory-region)
Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Cc: David Gibson <david@gibson.dropbear.id.au>
Cc: qemu-ppc@nongnu.org
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
---
hw/misc/macio/macio.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/misc/macio/macio.c b/hw/misc/macio/macio.c
index 3779865ab2..b3dddf8be7 100644
--- a/hw/misc/macio/macio.c
+++ b/hw/misc/macio/macio.c
@@ -368,6 +368,8 @@ static void macio_newworld_realize(PCIDevice *d, Error
**errp)
memory_region_add_subregion(&s->bar, 0x16000,
sysbus_mmio_get_region(sysbus_dev, 0));
} else {
+ object_unparent(OBJECT(&ns->gpio));
+
/* CUDA */
object_initialize_child(OBJECT(s), "cuda", &s->cuda, sizeof(s->cuda),
TYPE_CUDA, &error_abort, NULL);
--
2.26.2
- [PATCH v3 17/24] pnv/psi: Correct the pnv-psi* devices not to be sysbus devices, (continued)
- [PATCH v3 17/24] pnv/psi: Correct the pnv-psi* devices not to be sysbus devices, Markus Armbruster, 2020/06/09
- [PATCH v3 15/24] macio: Fix macio-bus to be a subtype of System bus, Markus Armbruster, 2020/06/09
- [PATCH v3 23/24] sd: Hide the qdev-but-not-quite thing created by sd_init(), Markus Armbruster, 2020/06/09
- [PATCH v3 03/24] sd/pxa2xx_mmci: Fix to realize "pxa2xx-mmci" device, Markus Armbruster, 2020/06/09
- [PATCH v3 11/24] pnv/phb4: Delete unused "pnv-phb4-pec-stack" devices, Markus Armbruster, 2020/06/09
- [PATCH v3 04/24] arm/aspeed: Compute the number of CPUs from the SoC definition, Markus Armbruster, 2020/06/09
- [PATCH v3 20/24] riscv: Fix type of SiFive[EU]SocState, member parent_obj, Markus Armbruster, 2020/06/09
- [PATCH v3 24/24] qdev: Assert onboard devices all get realized properly, Markus Armbruster, 2020/06/09
- [PATCH v3 06/24] armv7m: Delete unused "ARM,bitband-memory" devices, Markus Armbruster, 2020/06/09
- [PATCH v3 18/24] display/sm501 display/ati: Fix to realize "i2c-ddc", Markus Armbruster, 2020/06/09
- [PATCH v3 10/24] macio: Delete unused "macio-gpio" devices,
Markus Armbruster <=
- [PATCH v3 13/24] ppc4xx: Drop redundant device realization, Markus Armbruster, 2020/06/09
- [PATCH v3 22/24] qdev: Assert devices are plugged into a bus that can take them, Markus Armbruster, 2020/06/09
- [PATCH v3 07/24] auxbus: Fix aux-to-i2c-bridge to be a subtype of aux-slave, Markus Armbruster, 2020/06/09
- [PATCH v3 19/24] riscv: Fix to put "riscv.hart_array" devices on sysbus, Markus Armbruster, 2020/06/09