diff options
author | Reza Arbab <arbab@linux.ibm.com> | 2018-04-19 10:52:47 -0500 |
---|---|---|
committer | Stewart Smith <stewart@linux.ibm.com> | 2018-04-19 23:51:01 -0500 |
commit | 58b1e05b08d35fcdbb4f21e89561bb4e4c3d58c0 (patch) | |
tree | 1f80e5b79ee695a0b01550864dbb7d2459a295f3 | |
parent | df62a033675da4d620731133c0cda1b320adeac8 (diff) | |
download | talos-skiboot-58b1e05b08d35fcdbb4f21e89561bb4e4c3d58c0.tar.gz talos-skiboot-58b1e05b08d35fcdbb4f21e89561bb4e4c3d58c0.zip |
npu2: Improve log output of GPU-to-link mapping
Debugging issues related to unconnected NVLinks can be a little less
irritating if we use the NPU2DEV{DBG,INF}() macros instead of prlog().
In short, change this:
NPU2: comparing GPU 'GPU2' and NPU2 'GPU1'
NPU2: comparing GPU 'GPU3' and NPU2 'GPU1'
NPU2: comparing GPU 'GPU4' and NPU2 'GPU1'
NPU2: comparing GPU 'GPU5' and NPU2 'GPU1'
:
npu2_dev_bind_pci_dev: No PCI device for NPU2 device 0006:00:01.0 to bind to. If you expect a GPU to be there, this is a problem.
to this:
NPU6:0:1.0 Comparing GPU 'GPU2' and NPU2 'GPU1'
NPU6:0:1.0 Comparing GPU 'GPU3' and NPU2 'GPU1'
NPU6:0:1.0 Comparing GPU 'GPU4' and NPU2 'GPU1'
NPU6:0:1.0 Comparing GPU 'GPU5' and NPU2 'GPU1'
:
NPU6:0:1.0 No PCI device found for slot 'GPU1'
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
Reviewed-by: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
-rw-r--r-- | hw/npu2.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -400,8 +400,8 @@ static int __npu2_dev_bind_pci_dev(struct phb *phb __unused, pcislot = (char *)dt_prop_get(pci_dt_node, "ibm,slot-label"); - prlog(PR_DEBUG, "NPU2: comparing GPU '%s' and NPU2 '%s'\n", - pcislot, dev->nvlink.slot_label); + NPU2DEVDBG(dev, "Comparing GPU '%s' and NPU2 '%s'\n", + pcislot, dev->nvlink.slot_label); if (streq(pcislot, dev->nvlink.slot_label)) return 1; @@ -434,8 +434,8 @@ static void npu2_dev_bind_pci_dev(struct npu2_dev *dev) } } - prlog(PR_INFO, "%s: No PCI device for NPU2 device %04x:00:%02x.0 to bind to. If you expect a GPU to be there, this is a problem.\n", - __func__, dev->npu->phb_nvlink.opal_id, dev->index); + NPU2DEVINF(dev, "No PCI device found for slot '%s'\n", + dev->nvlink.slot_label); } static struct lock pci_npu_phandle_lock = LOCK_UNLOCKED; |