aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReza Arbab <arbab@linux.ibm.com>2019-08-07 12:17:24 -0500
committerOliver O'Halloran <oohall@gmail.com>2019-08-16 15:51:55 +1000
commita36a49440f60d5e8a9f8f61885bb99b376f149c5 (patch)
tree814161261c03188dd6358e50a978eb56c257fbeb
parent2422c100f6be8c8643caa98191f1c05a0d01d160 (diff)
downloadskiboot-a36a49440f60d5e8a9f8f61885bb99b376f149c5.zip
skiboot-a36a49440f60d5e8a9f8f61885bb99b376f149c5.tar.gz
skiboot-a36a49440f60d5e8a9f8f61885bb99b376f149c5.tar.bz2
npu: Fix device binding error message
Helping someone troubleshoot a Garrison machine, I noticed some of the BDFs printed here are wrong: npu_dev_bind_pci_dev: No PCI device for NPU device 0004:00:00.0 to bind to. If you expect a GPU to be there, this is a problem. npu_dev_bind_pci_dev: No PCI device for NPU device 0004:00:01.0 to bind to. If you expect a GPU to be there, this is a problem. npu_dev_bind_pci_dev: No PCI device for NPU device 0004:00:04.0 to bind to. If you expect a GPU to be there, this is a problem. npu_dev_bind_pci_dev: No PCI device for NPU device 0004:00:05.0 to bind to. If you expect a GPU to be there, this is a problem. Change the prlog() call to print them correctly. Signed-off-by: Reza Arbab <arbab@linux.ibm.com> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
-rw-r--r--hw/npu.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/hw/npu.c b/hw/npu.c
index 03a4a29..31eb8f0 100644
--- a/hw/npu.c
+++ b/hw/npu.c
@@ -385,8 +385,12 @@ static void npu_dev_bind_pci_dev(struct npu_dev *dev)
}
}
- prlog(PR_INFO, "%s: No PCI device for NPU 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.opal_id, dev->index);
+ prlog(PR_INFO, "%s: No PCI device for NPU device %04x:%02x:%02x.%x to bind to. If you expect a GPU to be there, this is a problem.\n",
+ __func__, dev->npu->phb.opal_id,
+ dev->pvd->bdfn >> 8 & 0xff,
+ dev->pvd->bdfn >> 3 & 0x1f,
+ dev->pvd->bdfn & 0x7);
+
}
static struct lock pci_npu_phandle_lock = LOCK_UNLOCKED;