[Skiboot] [PATCH] opal/hmi: Catch NPU2 HMIs for opencapi
Frederic Barrat
fbarrat at linux.ibm.com
Fri Aug 10 18:32:30 AEST 2018
Le 10/08/2018 à 06:41, Andrew Donnellan a écrit :
> On 10/08/18 14:02, Andrew Donnellan wrote:
>>> p = phb_to_npu(phb);
>>
>> This is broken - in fact, afaict it's currently broken for NVLink,
>> because this is using the NPU1 accessor function.
>>
>> You want something like this for NVLink (which might need to go to
>> stable?):
>>
>> if (dt_node_is_compatible(phb->dt_node, "ibm,power9-npu-pciex") &&
>> (dt_get_chip_id(phb->dt_node) == flat_chip_id)) {
>> p = phb_to_npu2_nvlink(phb);
>> break;
>> }
>>
>> And this for OpenCAPI:
>>
>> if (dt_node_is_compatible(phb->dt_node,
>> "ibm,power9-npu-pciex-opencapi") &&
>> (dt_get_chip_id(phb->dt_node) == flat_chip_id)) {
>> p = phb_to_npu2_dev_ocapi(phb)->npu;
>> break;
>> }
>
> Looking at this more closely - it's inconsequential as we don't
> reference p again after this point.
>
> It should really be just a boolean "found" or something.
Yeah, it doesn't really matter, but I'll clean it up. Thanks!
Fred
More information about the Skiboot
mailing list