Re: [RFC for-5.1 1/4] spapr: Refactor locating NVLink2 devices for device tree creation

2020-03-26 Thread David Gibson
On Thu, Mar 26, 2020 at 12:57:38PM +0100, Greg Kurz wrote: 65;5803;1c> On Thu, 26 Mar 2020 16:40:06 +1100 > David Gibson wrote: > > > Currently spapr_phb_nvgpu_populate_pcidev_dt() works a little cryptically. > > It steps through all the NVLink2 GPUs and NPUs and if they match the device > >

Re: [RFC for-5.1 1/4] spapr: Refactor locating NVLink2 devices for device tree creation

2020-03-26 Thread Greg Kurz
On Thu, 26 Mar 2020 16:40:06 +1100 David Gibson wrote: > Currently spapr_phb_nvgpu_populate_pcidev_dt() works a little cryptically. > It steps through all the NVLink2 GPUs and NPUs and if they match the device > we're called for, we generate the relevant device tree information. > > Make this a

[RFC for-5.1 1/4] spapr: Refactor locating NVLink2 devices for device tree creation

2020-03-25 Thread David Gibson
Currently spapr_phb_nvgpu_populate_pcidev_dt() works a little cryptically. It steps through all the NVLink2 GPUs and NPUs and if they match the device we're called for, we generate the relevant device tree information. Make this a little more obvious by introducing helpers to determine it a given