diff options
author | Cédric Le Goater <clg@kaod.org> | 2021-12-17 17:57:19 +0100 |
---|---|---|
committer | Cédric Le Goater <clg@kaod.org> | 2021-12-17 17:57:19 +0100 |
commit | a8fa95c7e621d3cd0dddb653b4f894fac65dec19 (patch) | |
tree | b2ee9d510e748c4d1df852e8870c1ccabbf66168 /hw | |
parent | 2c4d3a501e55bb90f90577b2e3f0181dc89efd42 (diff) |
ppc/pnv: Use the chip class to check the index of PHB3 devices
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>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Message-Id: <20211213132830.108372-4-clg@kaod.org>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/pci-host/pnv_phb3.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/pci-host/pnv_phb3.c b/hw/pci-host/pnv_phb3.c index 3aa42ef9d4..9c4451ca0d 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; } |