diff options
author | Oliver O'Halloran <oohall@gmail.com> | 2018-04-20 14:40:40 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.ibm.com> | 2018-04-23 00:06:59 -0500 |
commit | ac11641f1d70817bc746bedc139363ad41047f53 (patch) | |
tree | aa7f7cf8a6b2a1627f12b27aa3ea9f6f8780aaa6 /hdata/spira.c | |
parent | 6878b806682fd41b6560b40b7f0f198d6c90357c (diff) | |
download | skiboot-ac11641f1d70817bc746bedc139363ad41047f53.zip skiboot-ac11641f1d70817bc746bedc139363ad41047f53.tar.gz skiboot-ac11641f1d70817bc746bedc139363ad41047f53.tar.bz2 |
hdata/slots: Apply slot label to the parent slot
Slot names only really make sense when applied to an actual slot rather
than a device. On witherspoon the GPU devices have a name associated with
the device rather than the slot for the GPUs. Add a hack that moves the
slot label to the parent slot rather than on the device itself.
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'hdata/spira.c')
-rw-r--r-- | hdata/spira.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/hdata/spira.c b/hdata/spira.c index 360b7c7..5f98a83 100644 --- a/hdata/spira.c +++ b/hdata/spira.c @@ -1529,7 +1529,13 @@ static void add_npu(struct dt_node *xscom, const struct HDIF_array_hdr *links, continue; } - name = dt_prop_get_def(slot, "ibm,slot-label", + /* + * The slot_id points to a node that indicates that + * this GPU should appear under the slot. Grab the + * slot-label from the parent node that represents + * the actual slot. + */ + name = dt_prop_get_def(slot->parent, "ibm,slot-label", (char *)"<SLOT NAME MISSING>"); prlog(PR_DEBUG, "NPU: %04x:%d: Target slot %s\n", |