[PATCH v2] cxl: prevent read/write to AFU config space while AFU not configured
Andrew Donnellan
andrew.donnellan at au1.ibm.com
Tue Dec 13 17:11:12 AEDT 2016
It looks like there may still be a recursive locking issue in this
patch, please don't merge just yet...
On 10/12/16 03:30, Frederic Barrat wrote:
>> +static inline int cxl_pcie_config_info(struct pci_bus *bus, unsigned
>> int devfn,
>> + struct cxl_afu *afu, int *_record)
>> +{
>> + int record;
>>
>> - afu = (struct cxl_afu *)phb->private_data;
>> record = cxl_pcie_cfg_record(bus->number, devfn);
>> if (record > afu->crs_num)
>> return PCIBIOS_DEVICE_NOT_FOUND;
>>
>> - *_afu = afu;
>> *_record = record;
>> return 0;
>> }
>
>
> There's no reason to pass the afu parameter to that function, is it?
We use it to check afu->crs_num.
> Pushing it further, do we need cxl_pcie_config_info()? It's now a simple
> wrapper around cxl_pcie_cfg_record()
Hmm...
--
Andrew Donnellan OzLabs, ADL Canberra
andrew.donnellan at au1.ibm.com IBM Australia Limited
More information about the Linuxppc-dev
mailing list