[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 11/24] pnv/phb4: Delete unused "pnv-phb4-pec-stack" devices
From: |
Markus Armbruster |
Subject: |
[PATCH v3 11/24] pnv/phb4: Delete unused "pnv-phb4-pec-stack" devices |
Date: |
Tue, 9 Jun 2020 14:23:26 +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>
---
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
- Re: [PATCH v3 09/24] macio: Fix to realize "mos6522-cuda" and "mos6522-pmu" devices, (continued)
- [PATCH v3 12/24] MAINTAINERS: Make section PowerNV cover pci-host/pnv* as well, Markus Armbruster, 2020/06/09
- [PATCH v3 02/24] display/xlnx_dp: Fix to realize "i2c-ddc" and "aux-to-i2c-bridge", Markus Armbruster, 2020/06/09
- [PATCH v3 05/24] arm/aspeed: Rework NIC attachment, Markus Armbruster, 2020/06/09
- [PATCH v3 21/24] sparc/leon3: Fix to put grlib,* devices on sysbus, Markus Armbruster, 2020/06/09
- [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 <=
- [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, 2020/06/09
- [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