[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 11/24] pnv/phb4: Bury unwanted "pnv-phb4-pec-stack" devices
From: |
Markus Armbruster |
Subject: |
[PATCH 11/24] pnv/phb4: Bury unwanted "pnv-phb4-pec-stack" devices |
Date: |
Mon, 18 May 2020 07:03:55 +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.
Bury the unwanted 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 <address@hidden>
Cc: David Gibson <address@hidden>
Cc: address@hidden
Signed-off-by: Markus Armbruster <address@hidden>
---
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.21.1
- Re: [PATCH 15/24] macio: Fix macio-bus to be a subtype of System bus, (continued)
- [PATCH 19/24] riscv: Fix to put "riscv.hart_array" devices on sysbus, Markus Armbruster, 2020/05/18
- [PATCH 13/24] ppc4xx: Drop redundant device realization, Markus Armbruster, 2020/05/18
- [PATCH 11/24] pnv/phb4: Bury unwanted "pnv-phb4-pec-stack" devices,
Markus Armbruster <=
- [PATCH 17/24] pnv/psi: Correct the pnv-psi* devices not to be sysbus devices, Markus Armbruster, 2020/05/18
- [PATCH 23/24] sd: Hide the qdev-but-not-quite thing created by sd_init(), Markus Armbruster, 2020/05/18
- [PATCH 10/24] macio: Bury unwanted "macio-gpio" devices, Markus Armbruster, 2020/05/18