linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] PCI: Add MCFG quirk for 2nd node of Cavium ThunderX pass2.x host controller
@ 2017-03-29 12:16 Tomasz Nowicki
  2017-04-21 11:34 ` Robert Richter
  2017-04-21 16:56 ` Bjorn Helgaas
  0 siblings, 2 replies; 6+ messages in thread
From: Tomasz Nowicki @ 2017-03-29 12:16 UTC (permalink / raw)
  To: helgaas, Lorenzo.Pieralisi, robert.richter, ddaney,
	Vadim.Lomovtsev, rafael
  Cc: Sunil.Goutham, geethasowjanya.akula, linu.cherian, linux-pci,
	linux-arm-kernel, linux-acpi, Tomasz Nowicki

Currently SoCs pass2.x do not emulate EA headers for ACPI boot method at all.
However, for pass2.x some devices (like EDAC) advertise incorrect base addresses
in their BARs which results in driver probe failure during resource request.
Since all problematic blocks are on 2nd NUMA node under domain 10 add necessary
quirk entry to obtain BAR addresses correction using EA header emulation.

Fixes: 44f22bd91e88 ("PCI: Add MCFG quirks for Cavium ThunderX pass2.x host controller")
Signed-off-by: Tomasz Nowicki <tn@semihalf.com>
CC: stable@vger.kernel.org	# v4.10+
---
 drivers/acpi/pci_mcfg.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/acpi/pci_mcfg.c b/drivers/acpi/pci_mcfg.c
index a6a4cea..a0a391e 100644
--- a/drivers/acpi/pci_mcfg.c
+++ b/drivers/acpi/pci_mcfg.c
@@ -90,13 +90,14 @@ static struct mcfg_fixup mcfg_quirks[] = {
 	  &thunder_pem_ecam_ops, THUNDER_PEM_RES(0x894057000000UL, node) },  \
 	{ "CAVIUM", "THUNDERX", rev, 9 + (10 * (node)), MCFG_BUS_ANY,	    \
 	  &thunder_pem_ecam_ops, THUNDER_PEM_RES(0x89808f000000UL, node) }
+#define THUNDER_ECAM_QUIRK(rev, seg)					\
+	{ "CAVIUM", "THUNDERX", rev, seg, MCFG_BUS_ANY,			\
+	&pci_thunder_ecam_ops }
 	/* SoC pass2.x */
 	THUNDER_PEM_QUIRK(1, 0),
 	THUNDER_PEM_QUIRK(1, 1),
+	THUNDER_ECAM_QUIRK(1, 10),
 
-#define THUNDER_ECAM_QUIRK(rev, seg)					\
-	{ "CAVIUM", "THUNDERX", rev, seg, MCFG_BUS_ANY,			\
-	&pci_thunder_ecam_ops }
 	/* SoC pass1.x */
 	THUNDER_PEM_QUIRK(2, 0),	/* off-chip devices */
 	THUNDER_PEM_QUIRK(2, 1),	/* off-chip devices */
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] PCI: Add MCFG quirk for 2nd node of Cavium ThunderX pass2.x host controller
  2017-03-29 12:16 [PATCH 1/1] PCI: Add MCFG quirk for 2nd node of Cavium ThunderX pass2.x host controller Tomasz Nowicki
@ 2017-04-21 11:34 ` Robert Richter
  2017-04-21 16:56 ` Bjorn Helgaas
  1 sibling, 0 replies; 6+ messages in thread
From: Robert Richter @ 2017-04-21 11:34 UTC (permalink / raw)
  To: Tomasz Nowicki
  Cc: Lorenzo.Pieralisi, Sunil.Goutham, rafael, linux-pci, linu.cherian,
	ddaney, geethasowjanya.akula, linux-acpi, helgaas,
	Vadim.Lomovtsev, linux-arm-kernel

On 29.03.17 14:16:13, Tomasz Nowicki wrote:
> Currently SoCs pass2.x do not emulate EA headers for ACPI boot method at all.
> However, for pass2.x some devices (like EDAC) advertise incorrect base addresses
> in their BARs which results in driver probe failure during resource request.
> Since all problematic blocks are on 2nd NUMA node under domain 10 add necessary
> quirk entry to obtain BAR addresses correction using EA header emulation.
> 
> Fixes: 44f22bd91e88 ("PCI: Add MCFG quirks for Cavium ThunderX pass2.x host controller")
> Signed-off-by: Tomasz Nowicki <tn@semihalf.com>
> CC: stable@vger.kernel.org	# v4.10+

Acked-by: Robert Richter <rrichter@cavium.com>

Bjorn, please apply.

Thanks,

-Robert

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] PCI: Add MCFG quirk for 2nd node of Cavium ThunderX pass2.x host controller
  2017-03-29 12:16 [PATCH 1/1] PCI: Add MCFG quirk for 2nd node of Cavium ThunderX pass2.x host controller Tomasz Nowicki
  2017-04-21 11:34 ` Robert Richter
@ 2017-04-21 16:56 ` Bjorn Helgaas
  2017-04-21 17:30   ` Tomasz Nowicki
  2017-04-24  9:34   ` Robert Richter
  1 sibling, 2 replies; 6+ messages in thread
From: Bjorn Helgaas @ 2017-04-21 16:56 UTC (permalink / raw)
  To: Tomasz Nowicki
  Cc: Lorenzo.Pieralisi, Sunil.Goutham, rafael, linux-pci, linu.cherian,
	ddaney, geethasowjanya.akula, linux-acpi, robert.richter,
	Vadim.Lomovtsev, linux-arm-kernel

On Wed, Mar 29, 2017 at 02:16:13PM +0200, Tomasz Nowicki wrote:
> Currently SoCs pass2.x do not emulate EA headers for ACPI boot method at all.
> However, for pass2.x some devices (like EDAC) advertise incorrect base addresses
> in their BARs which results in driver probe failure during resource request.
> Since all problematic blocks are on 2nd NUMA node under domain 10 add necessary
> quirk entry to obtain BAR addresses correction using EA header emulation.
> 
> Fixes: 44f22bd91e88 ("PCI: Add MCFG quirks for Cavium ThunderX pass2.x host controller")
> Signed-off-by: Tomasz Nowicki <tn@semihalf.com>
> CC: stable@vger.kernel.org	# v4.10+

Sorry Tomasz, I must have mistakenly marked this "accepted" in
patchwork, so it fell off my to-do list.  It's too late to get this in
v4.11, but I can still apply it for v4.12.

I put it on my pci/host-thunder branch with Robert's ack.  I added a preceding
patch to tidy up whitespace, which makes this patch look like just:

        /* SoC pass2.x */
        THUNDER_PEM_QUIRK(1, 0),
        THUNDER_PEM_QUIRK(1, 1),
+       THUNDER_ECAM_QUIRK(1, 10),

Please double-check it to make sure this is what you need.

> ---
>  drivers/acpi/pci_mcfg.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/acpi/pci_mcfg.c b/drivers/acpi/pci_mcfg.c
> index a6a4cea..a0a391e 100644
> --- a/drivers/acpi/pci_mcfg.c
> +++ b/drivers/acpi/pci_mcfg.c
> @@ -90,13 +90,14 @@ static struct mcfg_fixup mcfg_quirks[] = {
>  	  &thunder_pem_ecam_ops, THUNDER_PEM_RES(0x894057000000UL, node) },  \
>  	{ "CAVIUM", "THUNDERX", rev, 9 + (10 * (node)), MCFG_BUS_ANY,	    \
>  	  &thunder_pem_ecam_ops, THUNDER_PEM_RES(0x89808f000000UL, node) }
> +#define THUNDER_ECAM_QUIRK(rev, seg)					\
> +	{ "CAVIUM", "THUNDERX", rev, seg, MCFG_BUS_ANY,			\
> +	&pci_thunder_ecam_ops }
>  	/* SoC pass2.x */
>  	THUNDER_PEM_QUIRK(1, 0),
>  	THUNDER_PEM_QUIRK(1, 1),
> +	THUNDER_ECAM_QUIRK(1, 10),
>  
> -#define THUNDER_ECAM_QUIRK(rev, seg)					\
> -	{ "CAVIUM", "THUNDERX", rev, seg, MCFG_BUS_ANY,			\
> -	&pci_thunder_ecam_ops }
>  	/* SoC pass1.x */
>  	THUNDER_PEM_QUIRK(2, 0),	/* off-chip devices */
>  	THUNDER_PEM_QUIRK(2, 1),	/* off-chip devices */
> -- 
> 2.7.4
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] PCI: Add MCFG quirk for 2nd node of Cavium ThunderX pass2.x host controller
  2017-04-21 16:56 ` Bjorn Helgaas
@ 2017-04-21 17:30   ` Tomasz Nowicki
  2017-04-24  9:34   ` Robert Richter
  1 sibling, 0 replies; 6+ messages in thread
From: Tomasz Nowicki @ 2017-04-21 17:30 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Lorenzo.Pieralisi, Sunil.Goutham, rafael, linux-pci, linu.cherian,
	ddaney, geethasowjanya.akula, linux-acpi, robert.richter,
	Vadim.Lomovtsev, linux-arm-kernel

On 21.04.2017 18:56, Bjorn Helgaas wrote:
> On Wed, Mar 29, 2017 at 02:16:13PM +0200, Tomasz Nowicki wrote:
>> Currently SoCs pass2.x do not emulate EA headers for ACPI boot method at all.
>> However, for pass2.x some devices (like EDAC) advertise incorrect base addresses
>> in their BARs which results in driver probe failure during resource request.
>> Since all problematic blocks are on 2nd NUMA node under domain 10 add necessary
>> quirk entry to obtain BAR addresses correction using EA header emulation.
>>
>> Fixes: 44f22bd91e88 ("PCI: Add MCFG quirks for Cavium ThunderX pass2.x host controller")
>> Signed-off-by: Tomasz Nowicki <tn@semihalf.com>
>> CC: stable@vger.kernel.org	# v4.10+
>
> Sorry Tomasz, I must have mistakenly marked this "accepted" in
> patchwork, so it fell off my to-do list.  It's too late to get this in
> v4.11, but I can still apply it for v4.12.
>
> I put it on my pci/host-thunder branch with Robert's ack.  I added a preceding
> patch to tidy up whitespace, which makes this patch look like just:
>
>         /* SoC pass2.x */
>         THUNDER_PEM_QUIRK(1, 0),
>         THUNDER_PEM_QUIRK(1, 1),
> +       THUNDER_ECAM_QUIRK(1, 10),
>
> Please double-check it to make sure this is what you need.

This is exactly what we need. Thank you Bjorn.

Tomasz

>
>> ---
>>  drivers/acpi/pci_mcfg.c | 7 ++++---
>>  1 file changed, 4 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/acpi/pci_mcfg.c b/drivers/acpi/pci_mcfg.c
>> index a6a4cea..a0a391e 100644
>> --- a/drivers/acpi/pci_mcfg.c
>> +++ b/drivers/acpi/pci_mcfg.c
>> @@ -90,13 +90,14 @@ static struct mcfg_fixup mcfg_quirks[] = {
>>  	  &thunder_pem_ecam_ops, THUNDER_PEM_RES(0x894057000000UL, node) },  \
>>  	{ "CAVIUM", "THUNDERX", rev, 9 + (10 * (node)), MCFG_BUS_ANY,	    \
>>  	  &thunder_pem_ecam_ops, THUNDER_PEM_RES(0x89808f000000UL, node) }
>> +#define THUNDER_ECAM_QUIRK(rev, seg)					\
>> +	{ "CAVIUM", "THUNDERX", rev, seg, MCFG_BUS_ANY,			\
>> +	&pci_thunder_ecam_ops }
>>  	/* SoC pass2.x */
>>  	THUNDER_PEM_QUIRK(1, 0),
>>  	THUNDER_PEM_QUIRK(1, 1),
>> +	THUNDER_ECAM_QUIRK(1, 10),
>>
>> -#define THUNDER_ECAM_QUIRK(rev, seg)					\
>> -	{ "CAVIUM", "THUNDERX", rev, seg, MCFG_BUS_ANY,			\
>> -	&pci_thunder_ecam_ops }
>>  	/* SoC pass1.x */
>>  	THUNDER_PEM_QUIRK(2, 0),	/* off-chip devices */
>>  	THUNDER_PEM_QUIRK(2, 1),	/* off-chip devices */
>> --
>> 2.7.4
>>


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] PCI: Add MCFG quirk for 2nd node of Cavium ThunderX pass2.x host controller
  2017-04-21 16:56 ` Bjorn Helgaas
  2017-04-21 17:30   ` Tomasz Nowicki
@ 2017-04-24  9:34   ` Robert Richter
  2017-04-24 17:05     ` Bjorn Helgaas
  1 sibling, 1 reply; 6+ messages in thread
From: Robert Richter @ 2017-04-24  9:34 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Tomasz Nowicki, Lorenzo.Pieralisi, ddaney, Vadim.Lomovtsev,
	rafael, Sunil.Goutham, geethasowjanya.akula, linu.cherian,
	linux-pci, linux-arm-kernel, linux-acpi

On 21.04.17 11:56:14, Bjorn Helgaas wrote:
> On Wed, Mar 29, 2017 at 02:16:13PM +0200, Tomasz Nowicki wrote:
> > Currently SoCs pass2.x do not emulate EA headers for ACPI boot method at all.
> > However, for pass2.x some devices (like EDAC) advertise incorrect base addresses
> > in their BARs which results in driver probe failure during resource request.
> > Since all problematic blocks are on 2nd NUMA node under domain 10 add necessary
> > quirk entry to obtain BAR addresses correction using EA header emulation.
> > 
> > Fixes: 44f22bd91e88 ("PCI: Add MCFG quirks for Cavium ThunderX pass2.x host controller")
> > Signed-off-by: Tomasz Nowicki <tn@semihalf.com>
> > CC: stable@vger.kernel.org	# v4.10+
> 
> Sorry Tomasz, I must have mistakenly marked this "accepted" in
> patchwork, so it fell off my to-do list.  It's too late to get this in
> v4.11, but I can still apply it for v4.12.
> 
> I put it on my pci/host-thunder branch with Robert's ack.  I added a preceding
> patch to tidy up whitespace, which makes this patch look like just:
> 
>         /* SoC pass2.x */
>         THUNDER_PEM_QUIRK(1, 0),
>         THUNDER_PEM_QUIRK(1, 1),
> +       THUNDER_ECAM_QUIRK(1, 10),
> 
> Please double-check it to make sure this is what you need.

Bjorn,

since the second is marked stable there will be conflicts when
applying it to stable (or built errors). The best would be to change
order of both (128cd6e8249f^, 128cd6e8249f) for smooth backporting
which makes it then more close to Tomasz's version again.

Thanks,

-Robert

> 
> > ---
> >  drivers/acpi/pci_mcfg.c | 7 ++++---
> >  1 file changed, 4 insertions(+), 3 deletions(-)
> > 
> > diff --git a/drivers/acpi/pci_mcfg.c b/drivers/acpi/pci_mcfg.c
> > index a6a4cea..a0a391e 100644
> > --- a/drivers/acpi/pci_mcfg.c
> > +++ b/drivers/acpi/pci_mcfg.c
> > @@ -90,13 +90,14 @@ static struct mcfg_fixup mcfg_quirks[] = {
> >  	  &thunder_pem_ecam_ops, THUNDER_PEM_RES(0x894057000000UL, node) },  \
> >  	{ "CAVIUM", "THUNDERX", rev, 9 + (10 * (node)), MCFG_BUS_ANY,	    \
> >  	  &thunder_pem_ecam_ops, THUNDER_PEM_RES(0x89808f000000UL, node) }
> > +#define THUNDER_ECAM_QUIRK(rev, seg)					\
> > +	{ "CAVIUM", "THUNDERX", rev, seg, MCFG_BUS_ANY,			\
> > +	&pci_thunder_ecam_ops }
> >  	/* SoC pass2.x */
> >  	THUNDER_PEM_QUIRK(1, 0),
> >  	THUNDER_PEM_QUIRK(1, 1),
> > +	THUNDER_ECAM_QUIRK(1, 10),
> >  
> > -#define THUNDER_ECAM_QUIRK(rev, seg)					\
> > -	{ "CAVIUM", "THUNDERX", rev, seg, MCFG_BUS_ANY,			\
> > -	&pci_thunder_ecam_ops }
> >  	/* SoC pass1.x */
> >  	THUNDER_PEM_QUIRK(2, 0),	/* off-chip devices */
> >  	THUNDER_PEM_QUIRK(2, 1),	/* off-chip devices */
> > -- 
> > 2.7.4
> > 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] PCI: Add MCFG quirk for 2nd node of Cavium ThunderX pass2.x host controller
  2017-04-24  9:34   ` Robert Richter
@ 2017-04-24 17:05     ` Bjorn Helgaas
  0 siblings, 0 replies; 6+ messages in thread
From: Bjorn Helgaas @ 2017-04-24 17:05 UTC (permalink / raw)
  To: Robert Richter
  Cc: Bjorn Helgaas, Tomasz Nowicki, Lorenzo Pieralisi, David Daney,
	Vadim.Lomovtsev, Rafael J. Wysocki, Sunil.Goutham,
	geethasowjanya.akula, linu.cherian, linux-pci@vger.kernel.org,
	linux-arm, linux-acpi@vger.kernel.org

On Mon, Apr 24, 2017 at 4:34 AM, Robert Richter
<robert.richter@cavium.com> wrote:
> On 21.04.17 11:56:14, Bjorn Helgaas wrote:
>> On Wed, Mar 29, 2017 at 02:16:13PM +0200, Tomasz Nowicki wrote:
>> > Currently SoCs pass2.x do not emulate EA headers for ACPI boot method at all.
>> > However, for pass2.x some devices (like EDAC) advertise incorrect base addresses
>> > in their BARs which results in driver probe failure during resource request.
>> > Since all problematic blocks are on 2nd NUMA node under domain 10 add necessary
>> > quirk entry to obtain BAR addresses correction using EA header emulation.
>> >
>> > Fixes: 44f22bd91e88 ("PCI: Add MCFG quirks for Cavium ThunderX pass2.x host controller")
>> > Signed-off-by: Tomasz Nowicki <tn@semihalf.com>
>> > CC: stable@vger.kernel.org  # v4.10+
>>
>> Sorry Tomasz, I must have mistakenly marked this "accepted" in
>> patchwork, so it fell off my to-do list.  It's too late to get this in
>> v4.11, but I can still apply it for v4.12.
>>
>> I put it on my pci/host-thunder branch with Robert's ack.  I added a preceding
>> patch to tidy up whitespace, which makes this patch look like just:
>>
>>         /* SoC pass2.x */
>>         THUNDER_PEM_QUIRK(1, 0),
>>         THUNDER_PEM_QUIRK(1, 1),
>> +       THUNDER_ECAM_QUIRK(1, 10),
>>
>> Please double-check it to make sure this is what you need.
>
> Bjorn,
>
> since the second is marked stable there will be conflicts when
> applying it to stable (or built errors). The best would be to change
> order of both (128cd6e8249f^, 128cd6e8249f) for smooth backporting
> which makes it then more close to Tomasz's version again.

Thanks, I should have noticed that.  Could go either way; I just
marked 128cd6e8249f^ for stable as well, since it seemed marginally
easier to read to split the whitespace changes from the real change.

>> > ---
>> >  drivers/acpi/pci_mcfg.c | 7 ++++---
>> >  1 file changed, 4 insertions(+), 3 deletions(-)
>> >
>> > diff --git a/drivers/acpi/pci_mcfg.c b/drivers/acpi/pci_mcfg.c
>> > index a6a4cea..a0a391e 100644
>> > --- a/drivers/acpi/pci_mcfg.c
>> > +++ b/drivers/acpi/pci_mcfg.c
>> > @@ -90,13 +90,14 @@ static struct mcfg_fixup mcfg_quirks[] = {
>> >       &thunder_pem_ecam_ops, THUNDER_PEM_RES(0x894057000000UL, node) },  \
>> >     { "CAVIUM", "THUNDERX", rev, 9 + (10 * (node)), MCFG_BUS_ANY,       \
>> >       &thunder_pem_ecam_ops, THUNDER_PEM_RES(0x89808f000000UL, node) }
>> > +#define THUNDER_ECAM_QUIRK(rev, seg)                                       \
>> > +   { "CAVIUM", "THUNDERX", rev, seg, MCFG_BUS_ANY,                 \
>> > +   &pci_thunder_ecam_ops }
>> >     /* SoC pass2.x */
>> >     THUNDER_PEM_QUIRK(1, 0),
>> >     THUNDER_PEM_QUIRK(1, 1),
>> > +   THUNDER_ECAM_QUIRK(1, 10),
>> >
>> > -#define THUNDER_ECAM_QUIRK(rev, seg)                                       \
>> > -   { "CAVIUM", "THUNDERX", rev, seg, MCFG_BUS_ANY,                 \
>> > -   &pci_thunder_ecam_ops }
>> >     /* SoC pass1.x */
>> >     THUNDER_PEM_QUIRK(2, 0),        /* off-chip devices */
>> >     THUNDER_PEM_QUIRK(2, 1),        /* off-chip devices */
>> > --
>> > 2.7.4
>> >
> --
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-04-24 17:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-29 12:16 [PATCH 1/1] PCI: Add MCFG quirk for 2nd node of Cavium ThunderX pass2.x host controller Tomasz Nowicki
2017-04-21 11:34 ` Robert Richter
2017-04-21 16:56 ` Bjorn Helgaas
2017-04-21 17:30   ` Tomasz Nowicki
2017-04-24  9:34   ` Robert Richter
2017-04-24 17:05     ` Bjorn Helgaas

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).