[Skiboot] [PATCH 09/13] hw/npu2: Combined NPU brick configuration procedure
Frederic Barrat
fbarrat at linux.ibm.com
Tue Jan 8 23:47:52 AEDT 2019
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.
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
More information about the Skiboot
mailing list