[Skiboot] [PATCH] npu2: Fix NPU<->GPU binding error message

Reza Arbab arbab at linux.ibm.com
Fri Apr 20 07:15:52 AEST 2018


On Thu, Apr 19, 2018 at 02:41:19PM +1000, Oliver O'Halloran wrote:
>--- a/hw/npu2.c
>+++ b/hw/npu2.c
>@@ -434,8 +434,9 @@ 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);
>+	prlog(PR_INFO, "%s: No PCI device for NPU2 device %04x:00:%02x.%x to bind to. If you expect a GPU to be there, this is a problem.\n",
>+	      __func__, dev->npu->phb_nvlink.opal_id, (dev->bdfn >> 3) & 0x1f,
>+	      dev->bdfn & 0x3);
> }
>
> static struct lock pci_npu_phandle_lock = LOCK_UNLOCKED;

Oddly enough, I just sent a patch about the same line:
http://patchwork.ozlabs.org/patch/901343/

It uses NPU2DEVINF() to print the location, including slot label.

-- 
Reza Arbab



More information about the Skiboot mailing list