[PATCH 05/15] powerpc/powernv/sriov: Move SR-IOV into a seperate file

Alexey Kardashevskiy aik at ozlabs.ru
Wed Jul 22 19:53:01 AEST 2020



On 22/07/2020 15:01, Oliver O'Halloran wrote:
> On Tue, Jul 14, 2020 at 7:16 PM Alexey Kardashevskiy <aik at ozlabs.ru> wrote:
>>
>> On 10/07/2020 15:23, Oliver O'Halloran wrote:
>>> +     align = pci_iov_resource_size(pdev, resno);
>>> +
>>> +     /*
>>> +      * iov can be null if we have an SR-IOV device with IOV BAR that can't
>>> +      * be placed in the m64 space (i.e. The BAR is 32bit or non-prefetch).
>>> +      * In that case we don't allow VFs to be enabled so just return the
>>> +      * default alignment.
>>> +      */
>>> +     if (!iov)
>>> +             return align;
>>
>>
>> This is the new chunk. What would happen before? Non-prefetch BAR would
>> still go to m64 space?
> 
> I don't think there's any real change. Currently if the setup in
> pnv_pci_ioda_fixup_iov_resources() fails then pdn->vfs_expanded will
> be zero. The !iov check here fills the same role, but it's more
> explicit. vfs_expanded has some other behaviour too so we can't get
> rid of it entirely (yet).

The check is fine, you have to have one as @iov can be NULL (unlike
pci_dn). The comment is what bothered me. It would make more sense
somewhere in pnv_pci_ioda_fixup_iov_resources() near
"dev_warn(&pdev->dev, "Don't support SR-IOV with"" as now it suggests
there is one reason for the failed iov configuration only while there
are two reasons.


-- 
Alexey


More information about the Linuxppc-dev mailing list