aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorFrederic Barrat <fbarrat@linux.ibm.com>2020-01-22 16:03:36 +0100
committerOliver O'Halloran <oohall@gmail.com>2020-01-29 13:51:35 +1100
commit8b9be4913366b02dbdb43bb8ddc7028a6e9129af (patch)
treed064d783d6122dd00e16b0885491920ff0674da5 /hw
parentbbb4777f682dab0f1411a493861af9e340e81229 (diff)
downloadskiboot-8b9be4913366b02dbdb43bb8ddc7028a6e9129af.zip
skiboot-8b9be4913366b02dbdb43bb8ddc7028a6e9129af.tar.gz
skiboot-8b9be4913366b02dbdb43bb8ddc7028a6e9129af.tar.bz2
npu3: Register virtual PHBs with static IDs
Assigning opal IDs to virtual PHBs dynamically may lead to userland seeing the PCI domain ID for an adapter vary when adding or removing another adapter (GPU or opencapi). This patch switches to using static opal IDs for virtual PHBs, based on their ibm,phb-index property, which was made static by a previous patch. Note that the PCI domain IDs will increase on the second chip (or more, if we had more) because we now reserve 16 IDs per chip for PHBs. This affects Axone only. We don't change anything on P9 and npu2, to avoid altering how domain IDs have been shown on already GA'd platforms. Reviewed-by: Reza Arbab <arbab@linux.ibm.com> Reviewed-by: Andrew Donnellan <ajd@linux.ibm.com> Signed-off-by: Frederic Barrat <fbarrat@linux.ibm.com> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/npu3-nvlink.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/npu3-nvlink.c b/hw/npu3-nvlink.c
index b8856dd..4eb704b 100644
--- a/hw/npu3-nvlink.c
+++ b/hw/npu3-nvlink.c
@@ -904,7 +904,8 @@ static void npu3_create_phb(struct npu3 *npu)
assert(phb->dt_node);
list_head_init(&phb->virt_devices);
- pci_register_phb(phb, OPAL_DYNAMIC_PHB_ID);
+ pci_register_phb(phb, npu3_get_opal_id(npu->chip_id,
+ npu3_get_phb_index(npu->index)));
npu3_create_phb_slot(npu);
npu3_ioda_reset(phb, true);
}