On 22/07/2020 15:01, Oliver O'Halloran wrote: > On Tue, Jul 14, 2020 at 7:16 PM Alexey Kardashevskiy <a...@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
- Re: [PATCH 03/15] powerpc/power... Alexey Kardashevskiy
- Re: [PATCH 03/15] powerpc/p... Cédric Le Goater
- Re: [PATCH 03/15] powerpc/p... Oliver O'Halloran
- [PATCH 04/15] powerpc/powernv/pci: Initialise M64 for... Oliver O'Halloran
- Re: [PATCH 04/15] powerpc/powernv/pci: Initialis... Alexey Kardashevskiy
- [PATCH 06/15] powerpc/powernv/sriov: Explain how SR-I... Oliver O'Halloran
- Re: [PATCH 06/15] powerpc/powernv/sriov: Explain... Alexey Kardashevskiy
- [PATCH 05/15] powerpc/powernv/sriov: Move SR-IOV into... Oliver O'Halloran
- Re: [PATCH 05/15] powerpc/powernv/sriov: Move SR... Alexey Kardashevskiy
- Re: [PATCH 05/15] powerpc/powernv/sriov: Mov... Oliver O'Halloran
- Re: [PATCH 05/15] powerpc/powernv/sriov:... Alexey Kardashevskiy
- [PATCH 07/15] powerpc/powernv/sriov: Rename truncate_... Oliver O'Halloran
- Re: [PATCH 07/15] powerpc/powernv/sriov: Rename ... Alexey Kardashevskiy
- [PATCH 08/15] powerpc/powernv/sriov: Simplify used wi... Oliver O'Halloran
- Re: [PATCH 08/15] powerpc/powernv/sriov: Simplif... Alexey Kardashevskiy
- Re: [PATCH 08/15] powerpc/powernv/sriov: Sim... Oliver O'Halloran
- [PATCH 09/15] powerpc/powernv/sriov: Factor out M64 B... Oliver O'Halloran
- Re: [PATCH 09/15] powerpc/powernv/sriov: Factor ... Alexey Kardashevskiy
- [PATCH 10/15] powerpc/powernv/pci: Refactor pnv_ioda_... Oliver O'Halloran
- Re: [PATCH 10/15] powerpc/powernv/pci: Refactor ... Alexey Kardashevskiy
- Re: [PATCH 10/15] powerpc/powernv/pci: Refac... Oliver O'Halloran