linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PCI: build Broadcom PAXC quirks unconditionally
@ 2019-11-15 13:58 Wei Liu
  2019-11-25 14:55 ` Wei Liu
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Wei Liu @ 2019-11-15 13:58 UTC (permalink / raw)
  To: linux-pci; +Cc: bhelgaas, rjui, Wei Liu

CONFIG_PCIE_IPROC_PLATFORM only gets defined when the driver is built
in.  Removing the ifdef will allow us to build the driver as a module.

Signed-off-by: Wei Liu <wei.liu@kernel.org>
---
Alternatively, we can change the condition to:

  #ifdef CONFIG_PCIE_IPROC_PLATFORM || CONFIG_PCIE_IPROC_PLATFORM_MODULE
.

I chose to remove the ifdef because that's what other quirks looked like
in this file.
---
 drivers/pci/quirks.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 320255e5e8f8..cd0e7c18e717 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -2381,7 +2381,6 @@ DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_BROADCOM,
 			 PCI_DEVICE_ID_TIGON3_5719,
 			 quirk_brcm_5719_limit_mrrs);
 
-#ifdef CONFIG_PCIE_IPROC_PLATFORM
 static void quirk_paxc_bridge(struct pci_dev *pdev)
 {
 	/*
@@ -2405,7 +2404,6 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_BROADCOM, 0x16f0, quirk_paxc_bridge);
 DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_BROADCOM, 0xd750, quirk_paxc_bridge);
 DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_BROADCOM, 0xd802, quirk_paxc_bridge);
 DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_BROADCOM, 0xd804, quirk_paxc_bridge);
-#endif
 
 /*
  * Originally in EDAC sources for i82875P: Intel tells BIOS developers to
-- 
2.24.0


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

* Re: [PATCH] PCI: build Broadcom PAXC quirks unconditionally
  2019-11-15 13:58 [PATCH] PCI: build Broadcom PAXC quirks unconditionally Wei Liu
@ 2019-11-25 14:55 ` Wei Liu
  2019-11-25 17:39   ` Ray Jui
  2019-11-25 17:39 ` Ray Jui
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 13+ messages in thread
From: Wei Liu @ 2019-11-25 14:55 UTC (permalink / raw)
  To: Wei Liu; +Cc: linux-pci, Bjorn Helgaas, rjui

On Fri, 15 Nov 2019 at 13:58, Wei Liu <wei.liu@kernel.org> wrote:
>
> CONFIG_PCIE_IPROC_PLATFORM only gets defined when the driver is built
> in.  Removing the ifdef will allow us to build the driver as a module.
>
> Signed-off-by: Wei Liu <wei.liu@kernel.org>
> ---
> Alternatively, we can change the condition to:
>
>   #ifdef CONFIG_PCIE_IPROC_PLATFORM || CONFIG_PCIE_IPROC_PLATFORM_MODULE
> .
>
> I chose to remove the ifdef because that's what other quirks looked like
> in this file.

Bjorn and Ray, any comment on this trivial patch?

Wei.

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

* Re: [PATCH] PCI: build Broadcom PAXC quirks unconditionally
  2019-11-15 13:58 [PATCH] PCI: build Broadcom PAXC quirks unconditionally Wei Liu
  2019-11-25 14:55 ` Wei Liu
@ 2019-11-25 17:39 ` Ray Jui
  2019-11-26 23:05 ` Bjorn Helgaas
  2019-12-11  0:09 ` Bjorn Helgaas
  3 siblings, 0 replies; 13+ messages in thread
From: Ray Jui @ 2019-11-25 17:39 UTC (permalink / raw)
  To: Wei Liu, linux-pci; +Cc: bhelgaas, rjui

Hi Wei,

On 11/15/19 5:58 AM, Wei Liu wrote:
> CONFIG_PCIE_IPROC_PLATFORM only gets defined when the driver is built
> in.  Removing the ifdef will allow us to build the driver as a module.
> 
> Signed-off-by: Wei Liu <wei.liu@kernel.org>
> ---
> Alternatively, we can change the condition to:
> 
>    #ifdef CONFIG_PCIE_IPROC_PLATFORM || CONFIG_PCIE_IPROC_PLATFORM_MODULE
> .
> 
> I chose to remove the ifdef because that's what other quirks looked like
> in this file.
> ---
>   drivers/pci/quirks.c | 2 --
>   1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
> index 320255e5e8f8..cd0e7c18e717 100644
> --- a/drivers/pci/quirks.c
> +++ b/drivers/pci/quirks.c
> @@ -2381,7 +2381,6 @@ DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_BROADCOM,
>   			 PCI_DEVICE_ID_TIGON3_5719,
>   			 quirk_brcm_5719_limit_mrrs);
>   
> -#ifdef CONFIG_PCIE_IPROC_PLATFORM
>   static void quirk_paxc_bridge(struct pci_dev *pdev)
>   {
>   	/*
> @@ -2405,7 +2404,6 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_BROADCOM, 0x16f0, quirk_paxc_bridge);
>   DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_BROADCOM, 0xd750, quirk_paxc_bridge);
>   DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_BROADCOM, 0xd802, quirk_paxc_bridge);
>   DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_BROADCOM, 0xd804, quirk_paxc_bridge);
> -#endif
>   
>   /*
>    * Originally in EDAC sources for i82875P: Intel tells BIOS developers to
> 

The change looks good to me. Thanks!

Reviewed-by: Ray Jui <ray.jui@broadcom.com>

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

* Re: [PATCH] PCI: build Broadcom PAXC quirks unconditionally
  2019-11-25 14:55 ` Wei Liu
@ 2019-11-25 17:39   ` Ray Jui
  0 siblings, 0 replies; 13+ messages in thread
From: Ray Jui @ 2019-11-25 17:39 UTC (permalink / raw)
  To: Wei Liu; +Cc: linux-pci, Bjorn Helgaas, rjui



On 11/25/19 6:55 AM, Wei Liu wrote:
> On Fri, 15 Nov 2019 at 13:58, Wei Liu <wei.liu@kernel.org> wrote:
>>
>> CONFIG_PCIE_IPROC_PLATFORM only gets defined when the driver is built
>> in.  Removing the ifdef will allow us to build the driver as a module.
>>
>> Signed-off-by: Wei Liu <wei.liu@kernel.org>
>> ---
>> Alternatively, we can change the condition to:
>>
>>    #ifdef CONFIG_PCIE_IPROC_PLATFORM || CONFIG_PCIE_IPROC_PLATFORM_MODULE
>> .
>>
>> I chose to remove the ifdef because that's what other quirks looked like
>> in this file.
> 
> Bjorn and Ray, any comment on this trivial patch?
> 
> Wei.
> 

I just reviewed it and it looks good to me. Thanks!

Ray

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

* Re: [PATCH] PCI: build Broadcom PAXC quirks unconditionally
  2019-11-15 13:58 [PATCH] PCI: build Broadcom PAXC quirks unconditionally Wei Liu
  2019-11-25 14:55 ` Wei Liu
  2019-11-25 17:39 ` Ray Jui
@ 2019-11-26 23:05 ` Bjorn Helgaas
  2019-11-27 10:59   ` Wei Liu
  2019-12-11  0:09 ` Bjorn Helgaas
  3 siblings, 1 reply; 13+ messages in thread
From: Bjorn Helgaas @ 2019-11-26 23:05 UTC (permalink / raw)
  To: Wei Liu; +Cc: linux-pci, rjui

On Fri, Nov 15, 2019 at 01:58:42PM +0000, Wei Liu wrote:
> CONFIG_PCIE_IPROC_PLATFORM only gets defined when the driver is built
> in.  Removing the ifdef will allow us to build the driver as a module.
> 
> Signed-off-by: Wei Liu <wei.liu@kernel.org>

Sorry, I missed this thinking it would be under drivers/pci/controller
and hence handled by Lorenzo.

So I guess this doesn't fix a build problem, but without this patch,
we just don't run the quirk if the driver is a module, right?

> ---
> Alternatively, we can change the condition to:
> 
>   #ifdef CONFIG_PCIE_IPROC_PLATFORM || CONFIG_PCIE_IPROC_PLATFORM_MODULE
>
> I chose to remove the ifdef because that's what other quirks looked like
> in this file.
> ---
>  drivers/pci/quirks.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
> index 320255e5e8f8..cd0e7c18e717 100644
> --- a/drivers/pci/quirks.c
> +++ b/drivers/pci/quirks.c
> @@ -2381,7 +2381,6 @@ DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_BROADCOM,
>  			 PCI_DEVICE_ID_TIGON3_5719,
>  			 quirk_brcm_5719_limit_mrrs);
>  
> -#ifdef CONFIG_PCIE_IPROC_PLATFORM
>  static void quirk_paxc_bridge(struct pci_dev *pdev)
>  {
>  	/*
> @@ -2405,7 +2404,6 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_BROADCOM, 0x16f0, quirk_paxc_bridge);
>  DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_BROADCOM, 0xd750, quirk_paxc_bridge);
>  DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_BROADCOM, 0xd802, quirk_paxc_bridge);
>  DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_BROADCOM, 0xd804, quirk_paxc_bridge);
> -#endif
>  
>  /*
>   * Originally in EDAC sources for i82875P: Intel tells BIOS developers to
> -- 
> 2.24.0
> 

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

* Re: [PATCH] PCI: build Broadcom PAXC quirks unconditionally
  2019-11-26 23:05 ` Bjorn Helgaas
@ 2019-11-27 10:59   ` Wei Liu
  2019-12-03 14:06     ` Wei Liu
  0 siblings, 1 reply; 13+ messages in thread
From: Wei Liu @ 2019-11-27 10:59 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: Wei Liu, linux-pci, rjui

On Tue, 26 Nov 2019 at 23:05, Bjorn Helgaas <helgaas@kernel.org> wrote:
>
> On Fri, Nov 15, 2019 at 01:58:42PM +0000, Wei Liu wrote:
> > CONFIG_PCIE_IPROC_PLATFORM only gets defined when the driver is built
> > in.  Removing the ifdef will allow us to build the driver as a module.
> >
> > Signed-off-by: Wei Liu <wei.liu@kernel.org>
>
> Sorry, I missed this thinking it would be under drivers/pci/controller
> and hence handled by Lorenzo.
>
> So I guess this doesn't fix a build problem, but without this patch,
> we just don't run the quirk if the driver is a module, right?
>

Yes, this is correct.

Without this patch, the quirk doesn't get to run if the driver is a module.

Wei.

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

* Re: [PATCH] PCI: build Broadcom PAXC quirks unconditionally
  2019-11-27 10:59   ` Wei Liu
@ 2019-12-03 14:06     ` Wei Liu
  2019-12-03 14:42       ` Bjorn Helgaas
  0 siblings, 1 reply; 13+ messages in thread
From: Wei Liu @ 2019-12-03 14:06 UTC (permalink / raw)
  To: Wei Liu; +Cc: Bjorn Helgaas, linux-pci, rjui

On Wed, 27 Nov 2019 at 10:59, Wei Liu <wei.liu@kernel.org> wrote:
>
> On Tue, 26 Nov 2019 at 23:05, Bjorn Helgaas <helgaas@kernel.org> wrote:
> >
> > On Fri, Nov 15, 2019 at 01:58:42PM +0000, Wei Liu wrote:
> > > CONFIG_PCIE_IPROC_PLATFORM only gets defined when the driver is built
> > > in.  Removing the ifdef will allow us to build the driver as a module.
> > >
> > > Signed-off-by: Wei Liu <wei.liu@kernel.org>
> >
> > Sorry, I missed this thinking it would be under drivers/pci/controller
> > and hence handled by Lorenzo.
> >
> > So I guess this doesn't fix a build problem, but without this patch,
> > we just don't run the quirk if the driver is a module, right?
> >
>
> Yes, this is correct.
>
> Without this patch, the quirk doesn't get to run if the driver is a module.
>

Hi Bjorn

Are you satisfied with the patch? What do I need to do to get it merged?

Thanks,
Wei.

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

* Re: [PATCH] PCI: build Broadcom PAXC quirks unconditionally
  2019-12-03 14:06     ` Wei Liu
@ 2019-12-03 14:42       ` Bjorn Helgaas
  2019-12-03 14:46         ` Wei Liu
  0 siblings, 1 reply; 13+ messages in thread
From: Bjorn Helgaas @ 2019-12-03 14:42 UTC (permalink / raw)
  To: Wei Liu; +Cc: linux-pci, rjui

On Tue, Dec 03, 2019 at 02:06:57PM +0000, Wei Liu wrote:
> On Wed, 27 Nov 2019 at 10:59, Wei Liu <wei.liu@kernel.org> wrote:
> >
> > On Tue, 26 Nov 2019 at 23:05, Bjorn Helgaas <helgaas@kernel.org> wrote:
> > >
> > > On Fri, Nov 15, 2019 at 01:58:42PM +0000, Wei Liu wrote:
> > > > CONFIG_PCIE_IPROC_PLATFORM only gets defined when the driver is built
> > > > in.  Removing the ifdef will allow us to build the driver as a module.
> > > >
> > > > Signed-off-by: Wei Liu <wei.liu@kernel.org>
> > >
> > > Sorry, I missed this thinking it would be under drivers/pci/controller
> > > and hence handled by Lorenzo.
> > >
> > > So I guess this doesn't fix a build problem, but without this patch,
> > > we just don't run the quirk if the driver is a module, right?
> >
> > Yes, this is correct.
> >
> > Without this patch, the quirk doesn't get to run if the driver is a module.
> 
> Are you satisfied with the patch? What do I need to do to get it merged?

You needn't do anything.  I'll clarify the changelog (the patch
doesn't actually *enable* building the driver as a module; it merely
ensures that we include the quirk in that case).

This is too late for v5.5, so it will get merged for v5.6 unless the
modular driver itself was enabled for v5.5.

Bjorn

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

* Re: [PATCH] PCI: build Broadcom PAXC quirks unconditionally
  2019-12-03 14:42       ` Bjorn Helgaas
@ 2019-12-03 14:46         ` Wei Liu
  0 siblings, 0 replies; 13+ messages in thread
From: Wei Liu @ 2019-12-03 14:46 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: Wei Liu, linux-pci, rjui

On Tue, 3 Dec 2019 at 14:42, Bjorn Helgaas <helgaas@kernel.org> wrote:
>
> On Tue, Dec 03, 2019 at 02:06:57PM +0000, Wei Liu wrote:
> > On Wed, 27 Nov 2019 at 10:59, Wei Liu <wei.liu@kernel.org> wrote:
> > >
> > > On Tue, 26 Nov 2019 at 23:05, Bjorn Helgaas <helgaas@kernel.org> wrote:
> > > >
> > > > On Fri, Nov 15, 2019 at 01:58:42PM +0000, Wei Liu wrote:
> > > > > CONFIG_PCIE_IPROC_PLATFORM only gets defined when the driver is built
> > > > > in.  Removing the ifdef will allow us to build the driver as a module.
> > > > >
> > > > > Signed-off-by: Wei Liu <wei.liu@kernel.org>
> > > >
> > > > Sorry, I missed this thinking it would be under drivers/pci/controller
> > > > and hence handled by Lorenzo.
> > > >
> > > > So I guess this doesn't fix a build problem, but without this patch,
> > > > we just don't run the quirk if the driver is a module, right?
> > >
> > > Yes, this is correct.
> > >
> > > Without this patch, the quirk doesn't get to run if the driver is a module.
> >
> > Are you satisfied with the patch? What do I need to do to get it merged?
>
> You needn't do anything.  I'll clarify the changelog (the patch
> doesn't actually *enable* building the driver as a module; it merely
> ensures that we include the quirk in that case).
>
> This is too late for v5.5, so it will get merged for v5.6 unless the
> modular driver itself was enabled for v5.5.
>

OK. Thanks for the clarification.

Wei.

> Bjorn

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

* Re: [PATCH] PCI: build Broadcom PAXC quirks unconditionally
  2019-11-15 13:58 [PATCH] PCI: build Broadcom PAXC quirks unconditionally Wei Liu
                   ` (2 preceding siblings ...)
  2019-11-26 23:05 ` Bjorn Helgaas
@ 2019-12-11  0:09 ` Bjorn Helgaas
  2019-12-11  0:28   ` Ray Jui
  3 siblings, 1 reply; 13+ messages in thread
From: Bjorn Helgaas @ 2019-12-11  0:09 UTC (permalink / raw)
  To: Wei Liu; +Cc: linux-pci, rjui

On Fri, Nov 15, 2019 at 01:58:42PM +0000, Wei Liu wrote:
> CONFIG_PCIE_IPROC_PLATFORM only gets defined when the driver is built
> in.  Removing the ifdef will allow us to build the driver as a module.
> 
> Signed-off-by: Wei Liu <wei.liu@kernel.org>
> ---
> Alternatively, we can change the condition to:
> 
>   #ifdef CONFIG_PCIE_IPROC_PLATFORM || CONFIG_PCIE_IPROC_PLATFORM_MODULE
> .
> 
> I chose to remove the ifdef because that's what other quirks looked like
> in this file.
> ---
>  drivers/pci/quirks.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
> index 320255e5e8f8..cd0e7c18e717 100644
> --- a/drivers/pci/quirks.c
> +++ b/drivers/pci/quirks.c
> @@ -2381,7 +2381,6 @@ DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_BROADCOM,
>  			 PCI_DEVICE_ID_TIGON3_5719,
>  			 quirk_brcm_5719_limit_mrrs);
>  
> -#ifdef CONFIG_PCIE_IPROC_PLATFORM
>  static void quirk_paxc_bridge(struct pci_dev *pdev)
>  {
>  	/*
> @@ -2405,7 +2404,6 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_BROADCOM, 0x16f0, quirk_paxc_bridge);
>  DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_BROADCOM, 0xd750, quirk_paxc_bridge);
>  DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_BROADCOM, 0xd802, quirk_paxc_bridge);
>  DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_BROADCOM, 0xd804, quirk_paxc_bridge);
> -#endif

Is there a reason this quirk can't be moved to
drivers/pci/controller/pcie-iproc-platform.c?  That would make it much
less subtle because it would be compiled if and only if the driver
itself is compiled.

If it needs to be here in quirks.c, please include a note about the
reason.

>  /*
>   * Originally in EDAC sources for i82875P: Intel tells BIOS developers to
> -- 
> 2.24.0
> 

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

* Re: [PATCH] PCI: build Broadcom PAXC quirks unconditionally
  2019-12-11  0:09 ` Bjorn Helgaas
@ 2019-12-11  0:28   ` Ray Jui
  2019-12-11  0:34     ` Bjorn Helgaas
  0 siblings, 1 reply; 13+ messages in thread
From: Ray Jui @ 2019-12-11  0:28 UTC (permalink / raw)
  To: Bjorn Helgaas, Wei Liu; +Cc: linux-pci, rjui



On 12/10/19 4:09 PM, Bjorn Helgaas wrote:
> On Fri, Nov 15, 2019 at 01:58:42PM +0000, Wei Liu wrote:
>> CONFIG_PCIE_IPROC_PLATFORM only gets defined when the driver is built
>> in.  Removing the ifdef will allow us to build the driver as a module.
>>
>> Signed-off-by: Wei Liu <wei.liu@kernel.org>
>> ---
>> Alternatively, we can change the condition to:
>>
>>    #ifdef CONFIG_PCIE_IPROC_PLATFORM || CONFIG_PCIE_IPROC_PLATFORM_MODULE
>> .
>>
>> I chose to remove the ifdef because that's what other quirks looked like
>> in this file.
>> ---
>>   drivers/pci/quirks.c | 2 --
>>   1 file changed, 2 deletions(-)
>>
>> diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
>> index 320255e5e8f8..cd0e7c18e717 100644
>> --- a/drivers/pci/quirks.c
>> +++ b/drivers/pci/quirks.c
>> @@ -2381,7 +2381,6 @@ DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_BROADCOM,
>>   			 PCI_DEVICE_ID_TIGON3_5719,
>>   			 quirk_brcm_5719_limit_mrrs);
>>   
>> -#ifdef CONFIG_PCIE_IPROC_PLATFORM
>>   static void quirk_paxc_bridge(struct pci_dev *pdev)
>>   {
>>   	/*
>> @@ -2405,7 +2404,6 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_BROADCOM, 0x16f0, quirk_paxc_bridge);
>>   DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_BROADCOM, 0xd750, quirk_paxc_bridge);
>>   DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_BROADCOM, 0xd802, quirk_paxc_bridge);
>>   DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_BROADCOM, 0xd804, quirk_paxc_bridge);
>> -#endif
> 
> Is there a reason this quirk can't be moved to
> drivers/pci/controller/pcie-iproc-platform.c?  That would make it much
> less subtle because it would be compiled if and only if the driver
> itself is compiled.
> 
> If it needs to be here in quirks.c, please include a note about the
> reason.
> 

There's no particular reason and yes it could be moved to pcie-iproc.c.

If that's preferred (and it sounds like it is) then we can do that.

Thanks,

Ray

>>   /*
>>    * Originally in EDAC sources for i82875P: Intel tells BIOS developers to
>> -- 
>> 2.24.0
>>

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

* Re: [PATCH] PCI: build Broadcom PAXC quirks unconditionally
  2019-12-11  0:28   ` Ray Jui
@ 2019-12-11  0:34     ` Bjorn Helgaas
  2019-12-11  0:42       ` Ray Jui
  0 siblings, 1 reply; 13+ messages in thread
From: Bjorn Helgaas @ 2019-12-11  0:34 UTC (permalink / raw)
  To: Ray Jui; +Cc: Wei Liu, linux-pci, rjui

On Tue, Dec 10, 2019 at 04:28:47PM -0800, Ray Jui wrote:
> 
> 
> On 12/10/19 4:09 PM, Bjorn Helgaas wrote:
> > On Fri, Nov 15, 2019 at 01:58:42PM +0000, Wei Liu wrote:
> > > CONFIG_PCIE_IPROC_PLATFORM only gets defined when the driver is built
> > > in.  Removing the ifdef will allow us to build the driver as a module.
> > > 
> > > Signed-off-by: Wei Liu <wei.liu@kernel.org>
> > > ---
> > > Alternatively, we can change the condition to:
> > > 
> > >    #ifdef CONFIG_PCIE_IPROC_PLATFORM || CONFIG_PCIE_IPROC_PLATFORM_MODULE
> > > .
> > > 
> > > I chose to remove the ifdef because that's what other quirks looked like
> > > in this file.
> > > ---
> > >   drivers/pci/quirks.c | 2 --
> > >   1 file changed, 2 deletions(-)
> > > 
> > > diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
> > > index 320255e5e8f8..cd0e7c18e717 100644
> > > --- a/drivers/pci/quirks.c
> > > +++ b/drivers/pci/quirks.c
> > > @@ -2381,7 +2381,6 @@ DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_BROADCOM,
> > >   			 PCI_DEVICE_ID_TIGON3_5719,
> > >   			 quirk_brcm_5719_limit_mrrs);
> > > -#ifdef CONFIG_PCIE_IPROC_PLATFORM
> > >   static void quirk_paxc_bridge(struct pci_dev *pdev)
> > >   {
> > >   	/*
> > > @@ -2405,7 +2404,6 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_BROADCOM, 0x16f0, quirk_paxc_bridge);
> > >   DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_BROADCOM, 0xd750, quirk_paxc_bridge);
> > >   DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_BROADCOM, 0xd802, quirk_paxc_bridge);
> > >   DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_BROADCOM, 0xd804, quirk_paxc_bridge);
> > > -#endif
> > 
> > Is there a reason this quirk can't be moved to
> > drivers/pci/controller/pcie-iproc-platform.c?  That would make it much
> > less subtle because it would be compiled if and only if the driver
> > itself is compiled.
> > 
> > If it needs to be here in quirks.c, please include a note about the
> > reason.
> 
> There's no particular reason and yes it could be moved to pcie-iproc.c.
> 
> If that's preferred (and it sounds like it is) then we can do that.

Yes, please, that would be great!  No #ifdefs, plus the code won't be
compiled into x86 and other arches that never use that driver.

Bjorn

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

* Re: [PATCH] PCI: build Broadcom PAXC quirks unconditionally
  2019-12-11  0:34     ` Bjorn Helgaas
@ 2019-12-11  0:42       ` Ray Jui
  0 siblings, 0 replies; 13+ messages in thread
From: Ray Jui @ 2019-12-11  0:42 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: Wei Liu, linux-pci, rjui



On 12/10/19 4:34 PM, Bjorn Helgaas wrote:
> On Tue, Dec 10, 2019 at 04:28:47PM -0800, Ray Jui wrote:
>>
>>
>> On 12/10/19 4:09 PM, Bjorn Helgaas wrote:
>>> On Fri, Nov 15, 2019 at 01:58:42PM +0000, Wei Liu wrote:
>>>> CONFIG_PCIE_IPROC_PLATFORM only gets defined when the driver is built
>>>> in.  Removing the ifdef will allow us to build the driver as a module.
>>>>
>>>> Signed-off-by: Wei Liu <wei.liu@kernel.org>
>>>> ---
>>>> Alternatively, we can change the condition to:
>>>>
>>>>     #ifdef CONFIG_PCIE_IPROC_PLATFORM || CONFIG_PCIE_IPROC_PLATFORM_MODULE
>>>> .
>>>>
>>>> I chose to remove the ifdef because that's what other quirks looked like
>>>> in this file.
>>>> ---
>>>>    drivers/pci/quirks.c | 2 --
>>>>    1 file changed, 2 deletions(-)
>>>>
>>>> diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
>>>> index 320255e5e8f8..cd0e7c18e717 100644
>>>> --- a/drivers/pci/quirks.c
>>>> +++ b/drivers/pci/quirks.c
>>>> @@ -2381,7 +2381,6 @@ DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_BROADCOM,
>>>>    			 PCI_DEVICE_ID_TIGON3_5719,
>>>>    			 quirk_brcm_5719_limit_mrrs);
>>>> -#ifdef CONFIG_PCIE_IPROC_PLATFORM
>>>>    static void quirk_paxc_bridge(struct pci_dev *pdev)
>>>>    {
>>>>    	/*
>>>> @@ -2405,7 +2404,6 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_BROADCOM, 0x16f0, quirk_paxc_bridge);
>>>>    DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_BROADCOM, 0xd750, quirk_paxc_bridge);
>>>>    DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_BROADCOM, 0xd802, quirk_paxc_bridge);
>>>>    DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_BROADCOM, 0xd804, quirk_paxc_bridge);
>>>> -#endif
>>>
>>> Is there a reason this quirk can't be moved to
>>> drivers/pci/controller/pcie-iproc-platform.c?  That would make it much
>>> less subtle because it would be compiled if and only if the driver
>>> itself is compiled.
>>>
>>> If it needs to be here in quirks.c, please include a note about the
>>> reason.
>>
>> There's no particular reason and yes it could be moved to pcie-iproc.c.
>>
>> If that's preferred (and it sounds like it is) then we can do that.
> 
> Yes, please, that would be great!  No #ifdefs, plus the code won't be
> compiled into x86 and other arches that never use that driver.
> 
> Bjorn
> 

Okay, Wei, let me know if you'd like to help with that? If not, I can 
make the change.

Thanks,

Ray

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

end of thread, other threads:[~2019-12-11  0:42 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-15 13:58 [PATCH] PCI: build Broadcom PAXC quirks unconditionally Wei Liu
2019-11-25 14:55 ` Wei Liu
2019-11-25 17:39   ` Ray Jui
2019-11-25 17:39 ` Ray Jui
2019-11-26 23:05 ` Bjorn Helgaas
2019-11-27 10:59   ` Wei Liu
2019-12-03 14:06     ` Wei Liu
2019-12-03 14:42       ` Bjorn Helgaas
2019-12-03 14:46         ` Wei Liu
2019-12-11  0:09 ` Bjorn Helgaas
2019-12-11  0:28   ` Ray Jui
2019-12-11  0:34     ` Bjorn Helgaas
2019-12-11  0:42       ` Ray Jui

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