[Skiboot] [PATCH] opal/hmi: Catch NPU2 HMIs for opencapi
Andrew Donnellan
andrew.donnellan at au1.ibm.com
Fri Aug 10 14:41:04 AEST 2018
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.
--
Andrew Donnellan OzLabs, ADL Canberra
andrew.donnellan at au1.ibm.com IBM Australia Limited
More information about the Skiboot
mailing list