ppc/pnv: Introduce a num_pecs class attribute for PHB4 PEC devices
commit422fd92e613ab6b5239538bf2dc1202eb9d3f0f5
authorCédric Le Goater <clg@kaod.org>
Fri, 17 Dec 2021 16:57:19 +0000 (17 17:57 +0100)
committerCédric Le Goater <clg@kaod.org>
Fri, 17 Dec 2021 16:57:19 +0000 (17 17:57 +0100)
treeda188b260ce7f96a34bdac5b049ba43347bc3a54
parent2ff73dda02d8a467ab56a0e497df7888a15af0c3
ppc/pnv: Introduce a num_pecs class attribute for PHB4 PEC devices

POWER9 processor comes with 3 PHB4 PEC (PCI Express Controller) and
each PEC can have several PHBs :

  * PEC0 provides 1 PHB  (PHB0)
  * PEC1 provides 2 PHBs (PHB1 and PHB2)
  * PEC2 provides 3 PHBs (PHB3, PHB4 and PHB5)

A num_pecs class attribute represents better the logic units of the
POWER9 chip. Use that instead of num_phbs which fits POWER8 chips.
This will ease adding support for user created devices.

Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20211213132830.108372-8-clg@kaod.org>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
hw/ppc/pnv.c
include/hw/ppc/pnv.h