[Skiboot] [PATCH v2] hw/phb4: Tune GPU direct performance on witherspoon in PCI mode

Frederic Barrat fbarrat at linux.ibm.com
Wed Mar 25 20:41:58 AEDT 2020



Le 25/03/2020 à 06:11, Oliver O'Halloran a écrit :
> On Wed, Mar 25, 2020 at 4:51 AM Frederic Barrat <fbarrat at linux.ibm.com> wrote:
>>
>> +
>> +static void witherspoon_pci_probe_complete(void)
>> +{
>> +       struct pci_device *dev;
>> +       struct phb *phb;
>> +       struct phb4 *p;
>> +
>> +       /*
>> +        * Reallocate dma engines between stacks in PEC2 if a Mellanox
>> +        * card is found on the shared slot, as it is required to get
>> +        * good GPU direct performance.
>> +        */
>> +       for_each_phb(phb) {
>> +               p = phb_to_phb4(phb);
>> +               if (p->index != 3)
>> +                       continue;
> 
> I think you need to check phb->type == phb_type_pcie_v4 before dereferencing p.


Duh! Thanks...


>> +               dev = pci_walk_dev(phb, NULL, check_mlx_cards, NULL);
>> +               if (dev)
>> +                       phb4_pec2_dma_engine_realloc(p);
>> +       }
>> +}



More information about the Skiboot mailing list