aboutsummaryrefslogtreecommitdiff
path: root/hw/npu.c
diff options
context:
space:
mode:
authorRussell Currey <ruscur@russell.cc>2016-06-16 11:24:41 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-06-21 14:48:54 +1000
commit5f3d23fe32068a678973902c3029087fd9f65823 (patch)
treeaf734127150b84ce394cbdd331344bde4a1d2ad1 /hw/npu.c
parenta28352d9632f9659fa54b20b900eb5ec886f3d5f (diff)
downloadskiboot-5f3d23fe32068a678973902c3029087fd9f65823.zip
skiboot-5f3d23fe32068a678973902c3029087fd9f65823.tar.gz
skiboot-5f3d23fe32068a678973902c3029087fd9f65823.tar.bz2
nvlink: Present chip ID as the NPU PHB slot location
EEH errors in the kernel report the physical slot location of the erroneous PE and its PHB. For NPU devices, the PE's slot location will refer to the physical GPU the link is associated with, and the PHB is actually a NPU chip which has no relevance to a physical slot on a board. Rather than reporting N/A for a NPU PHB's slot location, present the chip number. It's not particularly useful, but better than nothing. Signed-off-by: Russell Currey <ruscur@russell.cc> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw/npu.c')
-rw-r--r--hw/npu.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/hw/npu.c b/hw/npu.c
index d54e4bc..67b86c0 100644
--- a/hw/npu.c
+++ b/hw/npu.c
@@ -1730,6 +1730,7 @@ static void npu_add_phb_properties(struct npu *p)
0x800, 0x0, 0x0, 0x1, icsp, base_lsi + 2,
0x800, 0x0, 0x0, 0x2, icsp, base_lsi + 3 };
uint32_t mask[] = {0xf800, 0x0, 0x0, 0x7};
+ char slotbuf[32];
/* Add various properties that HB doesn't have to
* add, some of them simply because they result from
@@ -1784,6 +1785,13 @@ static void npu_add_phb_properties(struct npu *p)
hi32(mm_base), lo32(mm_base),
hi32(mm_base), lo32(mm_base),
hi32(mm_size), lo32(mm_size));
+
+ /* Set the slot location on the NPU PHB. This PHB can contain
+ * devices that correlate with multiple physical slots, so
+ * present the chip ID instead.
+ */
+ snprintf(slotbuf, sizeof(slotbuf), "NPU Chip %d", p->chip_id);
+ dt_add_property_string(np, "ibm,io-base-loc-code", slotbuf);
}
static void npu_create_phb(struct dt_node *dn)