[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 13/84] pnv/phb4: Delete unused "pnv-phb4-pec-stack" devices
From: |
Markus Armbruster |
Subject: |
[PULL 13/84] pnv/phb4: Delete unused "pnv-phb4-pec-stack" devices |
Date: |
Mon, 15 Jun 2020 22:38:57 +0200 |
The number of stacks is controlled by property "num-stacks".
pnv_pec_instance_init() creates the maximum supported number, because
the property has not been set then. pnv_pec_realize() realizes only
the wanted number. Works, although it can leave unrealized devices
hanging around in the QOM composition tree. Affects machine powernv9.
Delete the unused devices by making pnv_pec_realize() unparent them.
Visible in "info qom-tree":
/machine (powernv9-machine)
/chip[0] (power9_v2.0-pnv-chip)
[...]
/pec[0] (pnv-phb4-pec)
/stack[0] (pnv-phb4-pec-stack)
[...]
- /stack[1] (pnv-phb4-pec-stack)
- /phb (pnv-phb4)
- /pcie-mmcfg-mmio[0] (qemu:memory-region)
- /root (pnv-phb4-root-port)
- /source (xive-source)
- /stack[2] (pnv-phb4-pec-stack)
- /phb (pnv-phb4)
- /pcie-mmcfg-mmio[0] (qemu:memory-region)
- /root (pnv-phb4-root-port)
- /source (xive-source)
/xscom-pec-0.0-nest[0] (qemu:memory-region)
/xscom-pec-0.0-pci[0] (qemu:memory-region)
/pec[1] (pnv-phb4-pec)
/stack[0] (pnv-phb4-pec-stack)
[...]
/stack[1] (pnv-phb4-pec-stack)
[...]
- /stack[2] (pnv-phb4-pec-stack)
- /phb (pnv-phb4)
- /pcie-mmcfg-mmio[0] (qemu:memory-region)
- /root (pnv-phb4-root-port)
- /source (xive-source)
/xscom-pec-0.1-nest[0] (qemu:memory-region)
/xscom-pec-0.1-pci[0] (qemu:memory-region)
/pec[2] (pnv-phb4-pec)
/stack[0] (pnv-phb4-pec-stack)
[...]
/stack[1] (pnv-phb4-pec-stack)
[...]
/stack[2] (pnv-phb4-pec-stack)
[...]
Cc: Cédric Le Goater <clg@kaod.org>
Cc: David Gibson <david@gibson.dropbear.id.au>
Cc: qemu-ppc@nongnu.org
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20200609122339.937862-12-armbru@redhat.com>
---
hw/pci-host/pnv_phb4_pec.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/hw/pci-host/pnv_phb4_pec.c b/hw/pci-host/pnv_phb4_pec.c
index 911d147ffd..565345a018 100644
--- a/hw/pci-host/pnv_phb4_pec.c
+++ b/hw/pci-host/pnv_phb4_pec.c
@@ -397,6 +397,9 @@ static void pnv_pec_realize(DeviceState *dev, Error **errp)
return;
}
}
+ for (; i < PHB4_PEC_MAX_STACKS; i++) {
+ object_unparent(OBJECT(&pec->stacks[i]));
+ }
/* Initialize the XSCOM regions for the PEC registers */
snprintf(name, sizeof(name), "xscom-pec-%d.%d-nest", pec->chip_id,
--
2.26.2
- [PULL 58/84] auxbus: New aux_bus_realize(), pairing with aux_bus_init(), (continued)
- [PULL 58/84] auxbus: New aux_bus_realize(), pairing with aux_bus_init(), Markus Armbruster, 2020/06/15
- [PULL 56/84] qdev: qdev_create(), qdev_try_create() are now unused, drop, Markus Armbruster, 2020/06/15
- [PULL 39/84] pci: New pci_new(), pci_realize_and_unref() etc., Markus Armbruster, 2020/06/15
- [PULL 65/84] sysbus: Drop useless OBJECT() in sysbus_init_child_obj() calls, Markus Armbruster, 2020/06/15
- [PULL 83/84] qdev: qdev_init_nofail() is now unused, drop, Markus Armbruster, 2020/06/15
- [PULL 54/84] usb: usb_create() is now unused, drop, Markus Armbruster, 2020/06/15
- [PULL 66/84] microbit: Tidy up sysbus_init_child_obj() @child argument, Markus Armbruster, 2020/06/15
- [PULL 72/84] qdev: Drop qdev_realize() support for null bus, Markus Armbruster, 2020/06/15
- [PULL 34/84] qdev: Convert to qdev_unrealize() manually, Markus Armbruster, 2020/06/15
- [PULL 43/84] pci: pci_create(), pci_create_multifunction() are now unused, drop, Markus Armbruster, 2020/06/15
- [PULL 13/84] pnv/phb4: Delete unused "pnv-phb4-pec-stack" devices,
Markus Armbruster <=
- [PULL 55/84] usb: Eliminate usb_try_create_simple(), Markus Armbruster, 2020/06/15
- [PULL 63/84] macio: Convert use of qdev_set_parent_bus(), Markus Armbruster, 2020/06/15
- [PULL 84/84] MAINTAINERS: Make section QOM cover hw/core/*bus.c as well, Markus Armbruster, 2020/06/15
- [PULL 74/84] sysbus: Convert qdev_set_parent_bus() use with Coccinelle, part 2, Markus Armbruster, 2020/06/15
- [PULL 28/84] Revert "hw/prep: realize the PCI root bus as part of the prep init", Markus Armbruster, 2020/06/15
- [PULL 81/84] qdev: Use qdev_realize() in qdev_device_add(), Markus Armbruster, 2020/06/15
- [PULL 12/84] macio: Delete unused "macio-gpio" devices, Markus Armbruster, 2020/06/15
- [PULL 78/84] microbit: Eliminate two local variables in microbit_init(), Markus Armbruster, 2020/06/15
- [PULL 80/84] qdev: Make qdev_realize() support bus-less devices, Markus Armbruster, 2020/06/15
- [PULL 76/84] sysbus: Convert qdev_set_parent_bus() use with Coccinelle, part 4, Markus Armbruster, 2020/06/15