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

Oliver oohall at gmail.com
Fri Apr 20 10:24:47 AEST 2018


On Fri, Apr 20, 2018 at 7:15 AM, Reza Arbab <arbab at linux.ibm.com> wrote:
> 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.

Oh cool, that's probably a better idea than open coding the BDFN stuff here.


> --
> Reza Arbab
>


More information about the Skiboot mailing list