* [PATCH] powerpc/powernv/pci: Drop VF MPS fixup
@ 2020-09-02 3:51 Oliver O'Halloran
2022-03-10 9:03 ` Christophe Leroy
2022-05-24 11:10 ` Michael Ellerman
0 siblings, 2 replies; 6+ messages in thread
From: Oliver O'Halloran @ 2020-09-02 3:51 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Oliver O'Halloran
The MPS field in the VF config space is marked as reserved in current
versions of the SR-IOV spec. In other words, this fixup doesn't do
anything.
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
---
arch/powerpc/platforms/powernv/eeh-powernv.c | 18 ------------------
1 file changed, 18 deletions(-)
diff --git a/arch/powerpc/platforms/powernv/eeh-powernv.c b/arch/powerpc/platforms/powernv/eeh-powernv.c
index 9af8c3b98853..0cabe4e632e3 100644
--- a/arch/powerpc/platforms/powernv/eeh-powernv.c
+++ b/arch/powerpc/platforms/powernv/eeh-powernv.c
@@ -1689,24 +1689,6 @@ static struct eeh_ops pnv_eeh_ops = {
.notify_resume = NULL
};
-#ifdef CONFIG_PCI_IOV
-static void pnv_pci_fixup_vf_mps(struct pci_dev *pdev)
-{
- struct pci_dn *pdn = pci_get_pdn(pdev);
- int parent_mps;
-
- if (!pdev->is_virtfn)
- return;
-
- /* Synchronize MPS for VF and PF */
- parent_mps = pcie_get_mps(pdev->physfn);
- if ((128 << pdev->pcie_mpss) >= parent_mps)
- pcie_set_mps(pdev, parent_mps);
- pdn->mps = pcie_get_mps(pdev);
-}
-DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pnv_pci_fixup_vf_mps);
-#endif /* CONFIG_PCI_IOV */
-
/**
* eeh_powernv_init - Register platform dependent EEH operations
*
--
2.26.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] powerpc/powernv/pci: Drop VF MPS fixup
2020-09-02 3:51 [PATCH] powerpc/powernv/pci: Drop VF MPS fixup Oliver O'Halloran
@ 2022-03-10 9:03 ` Christophe Leroy
2022-05-19 12:38 ` Michael Ellerman
2022-05-24 11:10 ` Michael Ellerman
1 sibling, 1 reply; 6+ messages in thread
From: Christophe Leroy @ 2022-03-10 9:03 UTC (permalink / raw)
To: Oliver O'Halloran, linuxppc-dev
Le 02/09/2020 à 05:51, Oliver O'Halloran a écrit :
> The MPS field in the VF config space is marked as reserved in current
> versions of the SR-IOV spec. In other words, this fixup doesn't do
> anything.
>
> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
A lot of cleanup patches from Oliver were merged in Septembre 2020 but
not this one.
Any reason ?
Thanks
Christophe
> ---
> arch/powerpc/platforms/powernv/eeh-powernv.c | 18 ------------------
> 1 file changed, 18 deletions(-)
>
> diff --git a/arch/powerpc/platforms/powernv/eeh-powernv.c b/arch/powerpc/platforms/powernv/eeh-powernv.c
> index 9af8c3b98853..0cabe4e632e3 100644
> --- a/arch/powerpc/platforms/powernv/eeh-powernv.c
> +++ b/arch/powerpc/platforms/powernv/eeh-powernv.c
> @@ -1689,24 +1689,6 @@ static struct eeh_ops pnv_eeh_ops = {
> .notify_resume = NULL
> };
>
> -#ifdef CONFIG_PCI_IOV
> -static void pnv_pci_fixup_vf_mps(struct pci_dev *pdev)
> -{
> - struct pci_dn *pdn = pci_get_pdn(pdev);
> - int parent_mps;
> -
> - if (!pdev->is_virtfn)
> - return;
> -
> - /* Synchronize MPS for VF and PF */
> - parent_mps = pcie_get_mps(pdev->physfn);
> - if ((128 << pdev->pcie_mpss) >= parent_mps)
> - pcie_set_mps(pdev, parent_mps);
> - pdn->mps = pcie_get_mps(pdev);
> -}
> -DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pnv_pci_fixup_vf_mps);
> -#endif /* CONFIG_PCI_IOV */
> -
> /**
> * eeh_powernv_init - Register platform dependent EEH operations
> *
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] powerpc/powernv/pci: Drop VF MPS fixup
2022-03-10 9:03 ` Christophe Leroy
@ 2022-05-19 12:38 ` Michael Ellerman
2022-05-19 13:49 ` Oliver O'Halloran
0 siblings, 1 reply; 6+ messages in thread
From: Michael Ellerman @ 2022-05-19 12:38 UTC (permalink / raw)
To: Christophe Leroy, Oliver O'Halloran, linuxppc-dev
Christophe Leroy <christophe.leroy@csgroup.eu> writes:
> Le 02/09/2020 à 05:51, Oliver O'Halloran a écrit :
>> The MPS field in the VF config space is marked as reserved in current
>> versions of the SR-IOV spec. In other words, this fixup doesn't do
>> anything.
>>
>> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
>
> A lot of cleanup patches from Oliver were merged in Septembre 2020 but
> not this one.
>
> Any reason ?
It wasn't clear to me that it's safe to remove. The commit that added it
seemed to think it was important.
The fact that it's out-of-spec doesn't mean we don't have some hardware
somewhere that relies on that.
cheers
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] powerpc/powernv/pci: Drop VF MPS fixup
2022-05-19 12:38 ` Michael Ellerman
@ 2022-05-19 13:49 ` Oliver O'Halloran
2022-05-20 10:33 ` Michael Ellerman
0 siblings, 1 reply; 6+ messages in thread
From: Oliver O'Halloran @ 2022-05-19 13:49 UTC (permalink / raw)
To: Michael Ellerman; +Cc: linuxppc-dev
On Thu, May 19, 2022 at 10:38 PM Michael Ellerman <mpe@ellerman.id.au> wrote:
>
> Christophe Leroy <christophe.leroy@csgroup.eu> writes:
> > Le 02/09/2020 à 05:51, Oliver O'Halloran a écrit :
> >> The MPS field in the VF config space is marked as reserved in current
> >> versions of the SR-IOV spec. In other words, this fixup doesn't do
> >> anything.
> >>
> >> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
> >
> > A lot of cleanup patches from Oliver were merged in Septembre 2020 but
> > not this one.
> >
> > Any reason ?
>
> It wasn't clear to me that it's safe to remove. The commit that added it
> seemed to think it was important.
>
> The fact that it's out-of-spec doesn't mean we don't have some hardware
> somewhere that relies on that.
There is no hardware that depends on it. It was added in response to a
bug report on the IBM internal bugzilla about virtual functions not
reporting the same MPS as the physical function in the output of
lspci. This is by design since MPS is a property that is only relevant
to the PF. There was a corresponding patch to skiboot to intercept
writes to the MPS field of VFs which was used to fake a writable MPS
field in firmware. I removed that hack in 2019
(https://github.com/open-power/skiboot/commit/22057f868f3b2b1fd02647a738f6da0858b5eb6c)
since it was pointless and was causing other problems. There's no real
reason to keep this code around IMO.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] powerpc/powernv/pci: Drop VF MPS fixup
2022-05-19 13:49 ` Oliver O'Halloran
@ 2022-05-20 10:33 ` Michael Ellerman
0 siblings, 0 replies; 6+ messages in thread
From: Michael Ellerman @ 2022-05-20 10:33 UTC (permalink / raw)
To: Oliver O'Halloran; +Cc: linuxppc-dev
"Oliver O'Halloran" <oohall@gmail.com> writes:
> On Thu, May 19, 2022 at 10:38 PM Michael Ellerman <mpe@ellerman.id.au> wrote:
>> Christophe Leroy <christophe.leroy@csgroup.eu> writes:
>> > Le 02/09/2020 à 05:51, Oliver O'Halloran a écrit :
>> >> The MPS field in the VF config space is marked as reserved in current
>> >> versions of the SR-IOV spec. In other words, this fixup doesn't do
>> >> anything.
>> >>
>> >> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
>> >
>> > A lot of cleanup patches from Oliver were merged in Septembre 2020 but
>> > not this one.
>> >
>> > Any reason ?
>>
>> It wasn't clear to me that it's safe to remove. The commit that added it
>> seemed to think it was important.
>>
>> The fact that it's out-of-spec doesn't mean we don't have some hardware
>> somewhere that relies on that.
>
> There is no hardware that depends on it. It was added in response to a
> bug report on the IBM internal bugzilla about virtual functions not
> reporting the same MPS as the physical function in the output of
> lspci. This is by design since MPS is a property that is only relevant
> to the PF. There was a corresponding patch to skiboot to intercept
> writes to the MPS field of VFs which was used to fake a writable MPS
> field in firmware. I removed that hack in 2019
> (https://github.com/open-power/skiboot/commit/22057f868f3b2b1fd02647a738f6da0858b5eb6c)
> since it was pointless and was causing other problems. There's no real
> reason to keep this code around IMO.
Thanks for the extra detail, I am persuaded :)
cheers
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] powerpc/powernv/pci: Drop VF MPS fixup
2020-09-02 3:51 [PATCH] powerpc/powernv/pci: Drop VF MPS fixup Oliver O'Halloran
2022-03-10 9:03 ` Christophe Leroy
@ 2022-05-24 11:10 ` Michael Ellerman
1 sibling, 0 replies; 6+ messages in thread
From: Michael Ellerman @ 2022-05-24 11:10 UTC (permalink / raw)
To: linuxppc-dev, Oliver O'Halloran
On Wed, 2 Sep 2020 13:51:59 +1000, Oliver O'Halloran wrote:
> The MPS field in the VF config space is marked as reserved in current
> versions of the SR-IOV spec. In other words, this fixup doesn't do
> anything.
>
>
Applied to powerpc/next.
[1/1] powerpc/powernv/pci: Drop VF MPS fixup
https://git.kernel.org/powerpc/c/a5d28039ecb288f4788ae98c8291e092961e8742
cheers
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-05-24 11:25 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-02 3:51 [PATCH] powerpc/powernv/pci: Drop VF MPS fixup Oliver O'Halloran
2022-03-10 9:03 ` Christophe Leroy
2022-05-19 12:38 ` Michael Ellerman
2022-05-19 13:49 ` Oliver O'Halloran
2022-05-20 10:33 ` Michael Ellerman
2022-05-24 11:10 ` Michael Ellerman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).