summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReza Arbab <arbab@linux.ibm.com>2018-04-19 10:52:47 -0500
committerStewart Smith <stewart@linux.ibm.com>2018-04-19 23:51:01 -0500
commit58b1e05b08d35fcdbb4f21e89561bb4e4c3d58c0 (patch)
tree1f80e5b79ee695a0b01550864dbb7d2459a295f3
parentdf62a033675da4d620731133c0cda1b320adeac8 (diff)
downloadtalos-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.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/npu2.c b/hw/npu2.c
index 4122af92..dc9f220d 100644
--- a/hw/npu2.c
+++ b/hw/npu2.c
@@ -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;
OpenPOWER on IntegriCloud