diff options
author | Russell Currey <ruscur@russell.cc> | 2016-07-05 15:05:35 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2016-07-20 18:14:47 +1000 |
commit | 62bf371705955b4e32da9f3d18897333a0a34869 (patch) | |
tree | bfddb5ef1a780c6a8787db4b154e8d3ac1825bac /include/npu.h | |
parent | 8126e4c69407c1f9957ab2313015f46a30e1f1ec (diff) | |
download | skiboot-62bf371705955b4e32da9f3d18897333a0a34869.zip skiboot-62bf371705955b4e32da9f3d18897333a0a34869.tar.gz skiboot-62bf371705955b4e32da9f3d18897333a0a34869.tar.bz2 |
nvlink: Associate and allocate NPUs using slots
Allocating BDFNs to NPU devices and associating NPU devices with PCI
devices of GPUs both rely on comparing PBCQ handles. This will fail if a
system has multiple sets of GPUs behind a single PHB.
Rework this to instead use slot locations. The following changes are
introduced:
- Groups of NPU links that connect to the same GPU are presented in the
slot table entries as st_npu_slot, using ST_LOC_NPU_GROUP
- NPU links are created with the ibm,npu-group-id property replacing the
ibm,pbcq property, which is used in BDFN allocation and GPU association
- Slot comparison is handled slightly differently for NPU devices as the
function of the BDFN is ignored, since the device number represents the
physical GPU the link is connected to
- BDFN allocation for NPU devices is now derived from the groups in the
slot table. For Garrison, the same BDFNs are generated as before.
- Association with GPU PCI devices is performed by comparing the slot
label. This means for future machines with NPUs that slot labels
are compulsory to have NVLink functionality working.
Signed-off-by: Russell Currey <ruscur@russell.cc>
Reviewed-By: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'include/npu.h')
-rw-r--r-- | include/npu.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/npu.h b/include/npu.h index 778c985..800515a 100644 --- a/include/npu.h +++ b/include/npu.h @@ -148,6 +148,9 @@ struct npu_dev { uint32_t procedure_status; uint8_t pe_num; + + /* Used to associate the NPU device with GPU PCI devices */ + const char *slot_label; }; /* NPU PHB descriptor */ |