[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 03/19] ppc/pnv: Use the chip class to check the index of PHB3
From: |
Cédric Le Goater |
Subject: |
[PATCH v2 03/19] ppc/pnv: Use the chip class to check the index of PHB3 devices |
Date: |
Mon, 13 Dec 2021 14:28:14 +0100 |
The maximum number of PHB3 devices per chip can be different depending
on the POWER8 processor model.
Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
hw/pci-host/pnv_phb3.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/pci-host/pnv_phb3.c b/hw/pci-host/pnv_phb3.c
index 3aa42ef9d4b9..9c4451ca0d1c 100644
--- a/hw/pci-host/pnv_phb3.c
+++ b/hw/pci-host/pnv_phb3.c
@@ -993,7 +993,7 @@ static void pnv_phb3_realize(DeviceState *dev, Error **errp)
PnvMachineState *pnv = PNV_MACHINE(qdev_get_machine());
int i;
- if (phb->phb_id >= PNV8_CHIP_PHB3_MAX) {
+ if (phb->phb_id >= PNV_CHIP_GET_CLASS(phb->chip)->num_phbs) {
error_setg(errp, "invalid PHB index: %d", phb->phb_id);
return;
}
--
2.31.1
- [PATCH v2 00/19] ppc/pnv: Add support for user created PHB3/PHB4 devices, Cédric Le Goater, 2021/12/13
- [PATCH v2 06/19] ppc/pnv: Use QOM hierarchy to scan PHB3 devices, Cédric Le Goater, 2021/12/13
- [PATCH v2 02/19] ppc/pnv: Introduce a "chip" property under PHB3, Cédric Le Goater, 2021/12/13
- [PATCH v2 10/19] ppc/pnv: Introduce a num_stack class attribute, Cédric Le Goater, 2021/12/13
- [PATCH v2 12/19] ppc/pnv: Remove "system-memory" property from PHB4 PEC, Cédric Le Goater, 2021/12/13
- [PATCH v2 03/19] ppc/pnv: Use the chip class to check the index of PHB3 devices,
Cédric Le Goater <=
- [PATCH v2 11/19] ppc/pnv: Compute the PHB index from the PHB4 PEC model, Cédric Le Goater, 2021/12/13
- [PATCH v2 04/19] ppc/pnv: Drop the "num-phbs" property, Cédric Le Goater, 2021/12/13
- [PATCH v2 07/19] ppc/pnv: Introduce a num_pecs class attribute for PHB4 PEC devices, Cédric Le Goater, 2021/12/13
- [PATCH v2 13/19] ppc/pnv: Move realize of PEC stacks under the PEC model, Cédric Le Goater, 2021/12/13
- [PATCH v2 01/19] ppc/pnv: Change the maximum of PHB3 devices for Power8NVL, Cédric Le Goater, 2021/12/13
- [PATCH v2 14/19] ppc/pnv: Use QOM hierarchy to scan PEC PHB4 devices, Cédric Le Goater, 2021/12/13
- [PATCH v2 15/19] ppc/pnv: Introduce support for user created PHB3 devices, Cédric Le Goater, 2021/12/13