[Skiboot] [PATCH 09/13] hw/npu2: Combined NPU brick configuration procedure

Andrew Donnellan andrew.donnellan at au1.ibm.com
Wed Jan 9 17:28:01 AEDT 2019


On 8/1/19 11:47 pm, Frederic Barrat wrote:
> 
> 
> Le 12/12/2018 à 07:58, Andrew Donnellan a écrit :
>> To support the case where we have both OpenCAPI and NVLink devices
>> connected to the same NPU, we need to be able to configure each NPU
>> stack/brick separately depending on the device type it is connected to.
>>
>> Refactor the existing code so that we can set the transport muxes and 
>> other
>> relevant NPU registers on a per-brick/stack basis.
> 
> There's also some extra cleanup done in npu2 (before 2020, no less!), it 
> may be worth mentioning it in the commit message.

Which cleanups are you referring to? I can't tell from a quick skim of 
my own diff, it's been a month...

> 
> Other than that nitpick,
> Reviewed-by: Frederic Barrat <fbarrat at linux.ibm.com>
> 
> One question below
> 
> 
>> diff --git a/hw/npu2.c b/hw/npu2.c
>> index 8a4611424609..9e60b4e16f29 100644
>> --- a/hw/npu2.c
>> +++ b/hw/npu2.c
> 
>> @@ -1644,6 +1653,9 @@ static uint32_t npu_allocate_bdfn(struct npu2 
>> *p, uint32_t group, int size)
>>       int bdfn = (group << 3);
>>
>>       for (i = 0; i < size; i++) {
>> +        if (p->devices[i].type != NPU2_DEV_TYPE_NVLINK)
>> +            continue;
>> +
> 
> Is this to make sure nvlink virtual device functions are still numbered 
> 0, 1, 2 even of there's an opencapi card on obus0 of the same NPU?
> 
>   Fred

-- 
Andrew Donnellan              OzLabs, ADL Canberra
andrew.donnellan at au1.ibm.com  IBM Australia Limited



More information about the Skiboot mailing list