[Skiboot] [PATCH skiboot] npu2: Allow ATSD for LPAR other than 0

Andrew Donnellan andrew.donnellan at au1.ibm.com
Wed Dec 12 14:57:30 AEDT 2018


On 12/12/18 1:07 pm, Alistair Popple wrote:
>> You got me there :) It is "ibm,npu-link-index" in the hypervisor/vfio
>> but nothing says the index from npu2::devices[index] is the same thing,
>> I need this conversion here as "index" is not visible to the host system :-/
> 
> Yeah, that is what I was getting at. You could just use dev->link_index (which
> is the same as "ibm,npu-link-index") instead of npu2::devices[index]. That
> would make me somewhat happier. Theorectically there is nothing in HW that
> guarantees there will be a matching ATSD register for every npu-link-index,
> but in practice there is and it looks likely that won't change in future so it
> should be ok.

I didn't see this patch early enough and only noticed it when rebasing 
my current OpenCAPI work.

As part of my Witherspoon OpenCAPI enablement work I am currently 
looking at every place where we're currently indexing into the devices 
array (as that's a place where you probably want to check the type of 
the device you're looking at). There should be no uses of the array 
index at all, IMHO - always check link_index or brick_index explicitly.

Anyway, the v2 of this patch will need to be rebased on top of the 
series I'm about to send :)

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



More information about the Skiboot mailing list