All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bcma: Fix 'allmodconfig' and BCMA builds on MIPS targets
@ 2018-01-14 21:34 Guenter Roeck
  2018-01-14 21:40 ` Guenter Roeck
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Guenter Roeck @ 2018-01-14 21:34 UTC (permalink / raw)
  To: Rafał Miłecki
  Cc: linux-wireless, linux-kernel, Guenter Roeck, Matt Redfearn, James Hogan

Mips builds with BCMA host mode enabled fail in mainline and -next
with:

In file included from include/linux/bcma/bcma.h:10:0,
                 from drivers/bcma/bcma_private.h:9,
		 from drivers/bcma/main.c:8:
include/linux/bcma/bcma_driver_pci.h:218:24: error:
	field 'pci_controller' has incomplete type

Bisect points to commit d41e6858ba58c ("MIPS: Kconfig: Set default MIPS
system type as generic") as the culprit. Analysis shows that the commmit
changes PCI configuration and enables PCI_DRIVERS_GENERIC. This in turn
disables PCI_DRIVERS_LEGACY. 'struct pci_controller' is, however, only
defined if PCI_DRIVERS_LEGACY is enabled.

Ultimately that means that BCMA_DRIVER_PCI_HOSTMODE depends on
PCI_DRIVERS_LEGACY. Add the missing dependency.

Fixes: d41e6858ba58c ("MIPS: Kconfig: Set default MIPS system type as ...")
Cc: Matt Redfearn <matt.redfearn@imgtec.com>
Cc: James Hogan <jhogan@kernel.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
I am aware that this problem has been reported several times. I have
not been able to find a fix, but I may have missed it. If so, my
apologies for the noise.

Also note that this is not the only fix required; commit d41e6858ba58c,
as simple as it looks like, does a pretty good job messing up
"mips:allmodconfig" builds.

 drivers/bcma/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/bcma/Kconfig b/drivers/bcma/Kconfig
index 02d78f6cecbb..ba8acca036df 100644
--- a/drivers/bcma/Kconfig
+++ b/drivers/bcma/Kconfig
@@ -55,7 +55,7 @@ config BCMA_DRIVER_PCI
 
 config BCMA_DRIVER_PCI_HOSTMODE
 	bool "Driver for PCI core working in hostmode"
-	depends on MIPS && BCMA_DRIVER_PCI
+	depends on MIPS && BCMA_DRIVER_PCI && PCI_DRIVERS_LEGACY
 	help
 	  PCI core hostmode operation (external PCI bus).
 
-- 
2.7.4

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

* Re: [PATCH] bcma: Fix 'allmodconfig' and BCMA builds on MIPS targets
  2018-01-14 21:34 [PATCH] bcma: Fix 'allmodconfig' and BCMA builds on MIPS targets Guenter Roeck
@ 2018-01-14 21:40 ` Guenter Roeck
  2018-01-15 10:11   ` Kalle Valo
  2018-01-15 10:03 ` Kalle Valo
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 10+ messages in thread
From: Guenter Roeck @ 2018-01-14 21:40 UTC (permalink / raw)
  To: Rafał Miłecki
  Cc: linux-wireless, linux-kernel, Matt Redfearn, James Hogan,
	Linux MIPS Mailing List

[ copying linux-mips ]

On 01/14/2018 01:34 PM, Guenter Roeck wrote:
> Mips builds with BCMA host mode enabled fail in mainline and -next
> with:
> 
> In file included from include/linux/bcma/bcma.h:10:0,
>                   from drivers/bcma/bcma_private.h:9,
> 		 from drivers/bcma/main.c:8:
> include/linux/bcma/bcma_driver_pci.h:218:24: error:
> 	field 'pci_controller' has incomplete type
> 
> Bisect points to commit d41e6858ba58c ("MIPS: Kconfig: Set default MIPS
> system type as generic") as the culprit. Analysis shows that the commmit
> changes PCI configuration and enables PCI_DRIVERS_GENERIC. This in turn
> disables PCI_DRIVERS_LEGACY. 'struct pci_controller' is, however, only
> defined if PCI_DRIVERS_LEGACY is enabled.
> 
> Ultimately that means that BCMA_DRIVER_PCI_HOSTMODE depends on
> PCI_DRIVERS_LEGACY. Add the missing dependency.
> 
> Fixes: d41e6858ba58c ("MIPS: Kconfig: Set default MIPS system type as ...")
> Cc: Matt Redfearn <matt.redfearn@imgtec.com>
> Cc: James Hogan <jhogan@kernel.org>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> ---
> I am aware that this problem has been reported several times. I have
> not been able to find a fix, but I may have missed it. If so, my
> apologies for the noise.
> 
I should have said "I have not been able to find a patch fixing it".

> Also note that this is not the only fix required; commit d41e6858ba58c,
> as simple as it looks like, does a pretty good job messing up
> "mips:allmodconfig" builds.
> 
... nor did I find patch(es) fixing the other build problem(s) introduced
by d41e6858ba58c.

Guenter

>   drivers/bcma/Kconfig | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/bcma/Kconfig b/drivers/bcma/Kconfig
> index 02d78f6cecbb..ba8acca036df 100644
> --- a/drivers/bcma/Kconfig
> +++ b/drivers/bcma/Kconfig
> @@ -55,7 +55,7 @@ config BCMA_DRIVER_PCI
>   
>   config BCMA_DRIVER_PCI_HOSTMODE
>   	bool "Driver for PCI core working in hostmode"
> -	depends on MIPS && BCMA_DRIVER_PCI
> +	depends on MIPS && BCMA_DRIVER_PCI && PCI_DRIVERS_LEGACY
>   	help
>   	  PCI core hostmode operation (external PCI bus).
>   
> 

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

* Re: [PATCH] bcma: Fix 'allmodconfig' and BCMA builds on MIPS targets
  2018-01-14 21:34 [PATCH] bcma: Fix 'allmodconfig' and BCMA builds on MIPS targets Guenter Roeck
  2018-01-14 21:40 ` Guenter Roeck
@ 2018-01-15 10:03 ` Kalle Valo
  2018-01-15 10:23 ` James Hogan
  2018-01-16 19:15 ` Kalle Valo
  3 siblings, 0 replies; 10+ messages in thread
From: Kalle Valo @ 2018-01-15 10:03 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Rafał Miłecki, linux-wireless, linux-kernel,
	Matt Redfearn, James Hogan

Guenter Roeck <linux@roeck-us.net> writes:

> Mips builds with BCMA host mode enabled fail in mainline and -next
> with:
>
> In file included from include/linux/bcma/bcma.h:10:0,
>                  from drivers/bcma/bcma_private.h:9,
> 		 from drivers/bcma/main.c:8:
> include/linux/bcma/bcma_driver_pci.h:218:24: error:
> 	field 'pci_controller' has incomplete type
>
> Bisect points to commit d41e6858ba58c ("MIPS: Kconfig: Set default MIPS
> system type as generic") as the culprit. Analysis shows that the commmit
> changes PCI configuration and enables PCI_DRIVERS_GENERIC. This in turn
> disables PCI_DRIVERS_LEGACY. 'struct pci_controller' is, however, only
> defined if PCI_DRIVERS_LEGACY is enabled.
>
> Ultimately that means that BCMA_DRIVER_PCI_HOSTMODE depends on
> PCI_DRIVERS_LEGACY. Add the missing dependency.
>
> Fixes: d41e6858ba58c ("MIPS: Kconfig: Set default MIPS system type as ...")

So the first release for this commit was v4.15-rc1 so this is a recent
regression.

> Cc: Matt Redfearn <matt.redfearn@imgtec.com>
> Cc: James Hogan <jhogan@kernel.org>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> ---
> I am aware that this problem has been reported several times. I have
> not been able to find a fix, but I may have missed it. If so, my
> apologies for the noise.

As this fixes a build problem I'm planning to queue this for v4.15.

-- 
Kalle Valo

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

* Re: [PATCH] bcma: Fix 'allmodconfig' and BCMA builds on MIPS targets
  2018-01-14 21:40 ` Guenter Roeck
@ 2018-01-15 10:11   ` Kalle Valo
  0 siblings, 0 replies; 10+ messages in thread
From: Kalle Valo @ 2018-01-15 10:11 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Rafał Miłecki, linux-wireless, linux-kernel,
	Matt Redfearn, James Hogan, Linux MIPS Mailing List,
	matt.redfearn

Guenter Roeck <linux@roeck-us.net> writes:

> [ copying linux-mips ]
>
> On 01/14/2018 01:34 PM, Guenter Roeck wrote:
>> Mips builds with BCMA host mode enabled fail in mainline and -next
>> with:
>>
>> In file included from include/linux/bcma/bcma.h:10:0,
>>                   from drivers/bcma/bcma_private.h:9,
>> 		 from drivers/bcma/main.c:8:
>> include/linux/bcma/bcma_driver_pci.h:218:24: error:
>> 	field 'pci_controller' has incomplete type
>>
>> Bisect points to commit d41e6858ba58c ("MIPS: Kconfig: Set default MIPS
>> system type as generic") as the culprit. Analysis shows that the commmit
>> changes PCI configuration and enables PCI_DRIVERS_GENERIC. This in turn
>> disables PCI_DRIVERS_LEGACY. 'struct pci_controller' is, however, only
>> defined if PCI_DRIVERS_LEGACY is enabled.
>>
>> Ultimately that means that BCMA_DRIVER_PCI_HOSTMODE depends on
>> PCI_DRIVERS_LEGACY. Add the missing dependency.
>>
>> Fixes: d41e6858ba58c ("MIPS: Kconfig: Set default MIPS system type as ...")
>> Cc: Matt Redfearn <matt.redfearn@imgtec.com>
>> Cc: James Hogan <jhogan@kernel.org>
>> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
>> ---
>> I am aware that this problem has been reported several times. I have
>> not been able to find a fix, but I may have missed it. If so, my
>> apologies for the noise.
>>
> I should have said "I have not been able to find a patch fixing it".
>
>> Also note that this is not the only fix required; commit d41e6858ba58c,
>> as simple as it looks like, does a pretty good job messing up
>> "mips:allmodconfig" builds.
>>
> ... nor did I find patch(es) fixing the other build problem(s) introduced
> by d41e6858ba58c.

As I forgot to cc linux-mips on my previous email: I'm planning to queue
this for v4.15.

Over the weeked I got this bcma patch, but don't know if it's related or
not:

bcma: Prevent build of PCI host features in module
https://patchwork.kernel.org/patch/10161087/

And Guenter's patch is:

https://patchwork.kernel.org/patch/10162839/

Which one should I take? Adding also Matt.

And Matt also submitted similar patch for ssb:

ssb: Prevent build of PCI host features in module
https://patchwork.kernel.org/patch/10161131/

-- 
Kalle Valo

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

* Re: [PATCH] bcma: Fix 'allmodconfig' and BCMA builds on MIPS targets
  2018-01-14 21:34 [PATCH] bcma: Fix 'allmodconfig' and BCMA builds on MIPS targets Guenter Roeck
  2018-01-14 21:40 ` Guenter Roeck
  2018-01-15 10:03 ` Kalle Valo
@ 2018-01-15 10:23 ` James Hogan
  2018-01-15 17:10   ` Paul Burton
  2018-01-16 19:15 ` Kalle Valo
  3 siblings, 1 reply; 10+ messages in thread
From: James Hogan @ 2018-01-15 10:23 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Rafał Miłecki, linux-wireless, linux-kernel,
	Matt Redfearn, Paul Burton

[-- Attachment #1: Type: text/plain, Size: 2798 bytes --]

On Sun, Jan 14, 2018 at 01:34:02PM -0800, Guenter Roeck wrote:
> Mips builds with BCMA host mode enabled fail in mainline and -next
> with:
> 
> In file included from include/linux/bcma/bcma.h:10:0,
>                  from drivers/bcma/bcma_private.h:9,
> 		 from drivers/bcma/main.c:8:
> include/linux/bcma/bcma_driver_pci.h:218:24: error:
> 	field 'pci_controller' has incomplete type
> 
> Bisect points to commit d41e6858ba58c ("MIPS: Kconfig: Set default MIPS
> system type as generic") as the culprit. Analysis shows that the commmit
> changes PCI configuration and enables PCI_DRIVERS_GENERIC. This in turn
> disables PCI_DRIVERS_LEGACY. 'struct pci_controller' is, however, only
> defined if PCI_DRIVERS_LEGACY is enabled.
> 
> Ultimately that means that BCMA_DRIVER_PCI_HOSTMODE depends on
> PCI_DRIVERS_LEGACY. Add the missing dependency.
> 
> Fixes: d41e6858ba58c ("MIPS: Kconfig: Set default MIPS system type as ...")

Well, technically I think commit c5611df96804 ("MIPS: PCI: Introduce
CONFIG_PCI_DRIVERS_LEGACY") is to blame (Cc'ing paul), and the first bad
commit would be commit eed0eabd12ef ("MIPS: generic: Introduce generic
DT-based board support") which selects PCI_DRIVERS_GENERIC and is the
only platform to do so. Both commits were first in v4.9-rc1 and I can
reproduce this problem at that latter commit with the appropriate
configuration.

But yes clearly the mentioned commit does also expose that existing
problem more widely and to the default allmodconfig, and it looks like a
reasonable approach for now, so if some mention of the other two commits
is added:

Reviewed-by: James Hogan <jhogan@kernel.org>

Having it in 4.15 would be great.

Cheers
James

> Cc: Matt Redfearn <matt.redfearn@imgtec.com>
> Cc: James Hogan <jhogan@kernel.org>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> ---
> I am aware that this problem has been reported several times. I have
> not been able to find a fix, but I may have missed it. If so, my
> apologies for the noise.
> 
> Also note that this is not the only fix required; commit d41e6858ba58c,
> as simple as it looks like, does a pretty good job messing up
> "mips:allmodconfig" builds.
> 
>  drivers/bcma/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/bcma/Kconfig b/drivers/bcma/Kconfig
> index 02d78f6cecbb..ba8acca036df 100644
> --- a/drivers/bcma/Kconfig
> +++ b/drivers/bcma/Kconfig
> @@ -55,7 +55,7 @@ config BCMA_DRIVER_PCI
>  
>  config BCMA_DRIVER_PCI_HOSTMODE
>  	bool "Driver for PCI core working in hostmode"
> -	depends on MIPS && BCMA_DRIVER_PCI
> +	depends on MIPS && BCMA_DRIVER_PCI && PCI_DRIVERS_LEGACY
>  	help
>  	  PCI core hostmode operation (external PCI bus).
>  
> -- 
> 2.7.4
> 

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH] bcma: Fix 'allmodconfig' and BCMA builds on MIPS targets
  2018-01-15 10:23 ` James Hogan
@ 2018-01-15 17:10   ` Paul Burton
  2018-01-15 20:05     ` Guenter Roeck
  0 siblings, 1 reply; 10+ messages in thread
From: Paul Burton @ 2018-01-15 17:10 UTC (permalink / raw)
  To: James Hogan, Guenter Roeck
  Cc: Rafał Miłecki, linux-wireless, linux-kernel, Matt Redfearn

Hello,

On Mon, Jan 15, 2018 at 10:23:37AM +0000, James Hogan wrote:
> On Sun, Jan 14, 2018 at 01:34:02PM -0800, Guenter Roeck wrote:
> > Mips builds with BCMA host mode enabled fail in mainline and -next
> > with:
> > 
> > In file included from include/linux/bcma/bcma.h:10:0,
> >                  from drivers/bcma/bcma_private.h:9,
> > 		 from drivers/bcma/main.c:8:
> > include/linux/bcma/bcma_driver_pci.h:218:24: error:
> > 	field 'pci_controller' has incomplete type
> > 
> > Bisect points to commit d41e6858ba58c ("MIPS: Kconfig: Set default MIPS
> > system type as generic") as the culprit. Analysis shows that the commmit
> > changes PCI configuration and enables PCI_DRIVERS_GENERIC. This in turn
> > disables PCI_DRIVERS_LEGACY. 'struct pci_controller' is, however, only
> > defined if PCI_DRIVERS_LEGACY is enabled.
> > 
> > Ultimately that means that BCMA_DRIVER_PCI_HOSTMODE depends on
> > PCI_DRIVERS_LEGACY. Add the missing dependency.
> > 
> > Fixes: d41e6858ba58c ("MIPS: Kconfig: Set default MIPS system type as ...")
> 
> Well, technically I think commit c5611df96804 ("MIPS: PCI: Introduce
> CONFIG_PCI_DRIVERS_LEGACY") is to blame (Cc'ing paul), and the first bad
> commit would be commit eed0eabd12ef ("MIPS: generic: Introduce generic
> DT-based board support") which selects PCI_DRIVERS_GENERIC and is the
> only platform to do so. Both commits were first in v4.9-rc1 and I can
> reproduce this problem at that latter commit with the appropriate
> configuration.

Ah - yes if I recall correctly my assumption was that the MIPS-specific
struct pci_controller was only used by the MIPS-specific PCI drivers
under arch/mips/pci/, which are only built when configured for the
appropriate platform.

In this case use of that MIPS-specific struct pci_controller has spread
beyond arch/mips/ & the user can be configured in for platforms other
than the one that will actually use the driver, including the generic
platform which moves towards more generic PCI drivers in
drivers/pci/host/.

> But yes clearly the mentioned commit does also expose that existing
> problem more widely and to the default allmodconfig, and it looks like a
> reasonable approach for now, so if some mention of the other two commits
> is added:
> 
> Reviewed-by: James Hogan <jhogan@kernel.org>

Likewise, with the "Fixes:" tag fixed:

    Reviewed-by: Paul Burton <paul.burton@mips.com>

Thanks,
    Paul

> Having it in 4.15 would be great.
> 
> Cheers
> James
> 
> > Cc: Matt Redfearn <matt.redfearn@imgtec.com>
> > Cc: James Hogan <jhogan@kernel.org>
> > Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> > ---
> > I am aware that this problem has been reported several times. I have
> > not been able to find a fix, but I may have missed it. If so, my
> > apologies for the noise.
> > 
> > Also note that this is not the only fix required; commit d41e6858ba58c,
> > as simple as it looks like, does a pretty good job messing up
> > "mips:allmodconfig" builds.
> > 
> >  drivers/bcma/Kconfig | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/bcma/Kconfig b/drivers/bcma/Kconfig
> > index 02d78f6cecbb..ba8acca036df 100644
> > --- a/drivers/bcma/Kconfig
> > +++ b/drivers/bcma/Kconfig
> > @@ -55,7 +55,7 @@ config BCMA_DRIVER_PCI
> >  
> >  config BCMA_DRIVER_PCI_HOSTMODE
> >  	bool "Driver for PCI core working in hostmode"
> > -	depends on MIPS && BCMA_DRIVER_PCI
> > +	depends on MIPS && BCMA_DRIVER_PCI && PCI_DRIVERS_LEGACY
> >  	help
> >  	  PCI core hostmode operation (external PCI bus).
> >  
> > -- 
> > 2.7.4
> > 

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

* Re: [PATCH] bcma: Fix 'allmodconfig' and BCMA builds on MIPS targets
  2018-01-15 17:10   ` Paul Burton
@ 2018-01-15 20:05     ` Guenter Roeck
  2018-01-15 20:30       ` James Hogan
  0 siblings, 1 reply; 10+ messages in thread
From: Guenter Roeck @ 2018-01-15 20:05 UTC (permalink / raw)
  To: Paul Burton, James Hogan
  Cc: Rafał Miłecki, linux-wireless, linux-kernel,
	Matt Redfearn, Linux MIPS Mailing List

On 01/15/2018 09:10 AM, Paul Burton wrote:
> Hello,
> 
> On Mon, Jan 15, 2018 at 10:23:37AM +0000, James Hogan wrote:
>> On Sun, Jan 14, 2018 at 01:34:02PM -0800, Guenter Roeck wrote:
>>> Mips builds with BCMA host mode enabled fail in mainline and -next
>>> with:
>>>
>>> In file included from include/linux/bcma/bcma.h:10:0,
>>>                   from drivers/bcma/bcma_private.h:9,
>>> 		 from drivers/bcma/main.c:8:
>>> include/linux/bcma/bcma_driver_pci.h:218:24: error:
>>> 	field 'pci_controller' has incomplete type
>>>
>>> Bisect points to commit d41e6858ba58c ("MIPS: Kconfig: Set default MIPS
>>> system type as generic") as the culprit. Analysis shows that the commmit
>>> changes PCI configuration and enables PCI_DRIVERS_GENERIC. This in turn
>>> disables PCI_DRIVERS_LEGACY. 'struct pci_controller' is, however, only
>>> defined if PCI_DRIVERS_LEGACY is enabled.
>>>
>>> Ultimately that means that BCMA_DRIVER_PCI_HOSTMODE depends on
>>> PCI_DRIVERS_LEGACY. Add the missing dependency.
>>>
>>> Fixes: d41e6858ba58c ("MIPS: Kconfig: Set default MIPS system type as ...")
>>
>> Well, technically I think commit c5611df96804 ("MIPS: PCI: Introduce
>> CONFIG_PCI_DRIVERS_LEGACY") is to blame (Cc'ing paul), and the first bad
>> commit would be commit eed0eabd12ef ("MIPS: generic: Introduce generic
>> DT-based board support") which selects PCI_DRIVERS_GENERIC and is the
>> only platform to do so. Both commits were first in v4.9-rc1 and I can
>> reproduce this problem at that latter commit with the appropriate
>> configuration.
> 
> Ah - yes if I recall correctly my assumption was that the MIPS-specific
> struct pci_controller was only used by the MIPS-specific PCI drivers
> under arch/mips/pci/, which are only built when configured for the
> appropriate platform.
> 
> In this case use of that MIPS-specific struct pci_controller has spread
> beyond arch/mips/ & the user can be configured in for platforms other
> than the one that will actually use the driver, including the generic
> platform which moves towards more generic PCI drivers in
> drivers/pci/host/.
> 
>> But yes clearly the mentioned commit does also expose that existing
>> problem more widely and to the default allmodconfig, and it looks like a
>> reasonable approach for now, so if some mention of the other two commits
>> is added:
>>
>> Reviewed-by: James Hogan <jhogan@kernel.org>
> 
> Likewise, with the "Fixes:" tag fixed:
> 
>      Reviewed-by: Paul Burton <paul.burton@mips.com>
> 

Unfortunately, that alone doesn't fix the problem. SSB driver dependencies
are also broken, and in much worse shape. I had to add dependencies in five
places to get it to build, and the result is so messy that I won't even try
to submit it. And if that is fixed, mips:allmodconfig still doesn't build -
the next error is an undefined reference to physical_memsize in
arch/mips/kernel/vpe-mt.o.

I wonder if I should just stop trying to build allmodconfig for mips.
Any thoughts ?

Guenter

> Thanks,
>      Paul
> 
>> Having it in 4.15 would be great.
>>
>> Cheers
>> James
>>
>>> Cc: Matt Redfearn <matt.redfearn@imgtec.com>
>>> Cc: James Hogan <jhogan@kernel.org>
>>> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
>>> ---
>>> I am aware that this problem has been reported several times. I have
>>> not been able to find a fix, but I may have missed it. If so, my
>>> apologies for the noise.
>>>
>>> Also note that this is not the only fix required; commit d41e6858ba58c,
>>> as simple as it looks like, does a pretty good job messing up
>>> "mips:allmodconfig" builds.
>>>
>>>   drivers/bcma/Kconfig | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/bcma/Kconfig b/drivers/bcma/Kconfig
>>> index 02d78f6cecbb..ba8acca036df 100644
>>> --- a/drivers/bcma/Kconfig
>>> +++ b/drivers/bcma/Kconfig
>>> @@ -55,7 +55,7 @@ config BCMA_DRIVER_PCI
>>>   
>>>   config BCMA_DRIVER_PCI_HOSTMODE
>>>   	bool "Driver for PCI core working in hostmode"
>>> -	depends on MIPS && BCMA_DRIVER_PCI
>>> +	depends on MIPS && BCMA_DRIVER_PCI && PCI_DRIVERS_LEGACY
>>>   	help
>>>   	  PCI core hostmode operation (external PCI bus).
>>>   
>>> -- 
>>> 2.7.4
>>>
> 
> 
> 

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

* Re: [PATCH] bcma: Fix 'allmodconfig' and BCMA builds on MIPS targets
  2018-01-15 20:05     ` Guenter Roeck
@ 2018-01-15 20:30       ` James Hogan
  2018-01-15 20:58         ` Guenter Roeck
  0 siblings, 1 reply; 10+ messages in thread
From: James Hogan @ 2018-01-15 20:30 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Paul Burton, Rafał Miłecki, linux-wireless,
	linux-kernel, Matt Redfearn, Linux MIPS Mailing List

On Mon, Jan 15, 2018 at 12:05:48PM -0800, Guenter Roeck wrote:
> On 01/15/2018 09:10 AM, Paul Burton wrote:
> > Hello,
> > 
> > On Mon, Jan 15, 2018 at 10:23:37AM +0000, James Hogan wrote:
> >> On Sun, Jan 14, 2018 at 01:34:02PM -0800, Guenter Roeck wrote:
> >>> Mips builds with BCMA host mode enabled fail in mainline and -next
> >>> with:
> >>>
> >>> In file included from include/linux/bcma/bcma.h:10:0,
> >>>                   from drivers/bcma/bcma_private.h:9,
> >>> 		 from drivers/bcma/main.c:8:
> >>> include/linux/bcma/bcma_driver_pci.h:218:24: error:
> >>> 	field 'pci_controller' has incomplete type
> >>>
> >>> Bisect points to commit d41e6858ba58c ("MIPS: Kconfig: Set default MIPS
> >>> system type as generic") as the culprit. Analysis shows that the commmit
> >>> changes PCI configuration and enables PCI_DRIVERS_GENERIC. This in turn
> >>> disables PCI_DRIVERS_LEGACY. 'struct pci_controller' is, however, only
> >>> defined if PCI_DRIVERS_LEGACY is enabled.
> >>>
> >>> Ultimately that means that BCMA_DRIVER_PCI_HOSTMODE depends on
> >>> PCI_DRIVERS_LEGACY. Add the missing dependency.
> >>>
> >>> Fixes: d41e6858ba58c ("MIPS: Kconfig: Set default MIPS system type as ...")
> >>
> >> Well, technically I think commit c5611df96804 ("MIPS: PCI: Introduce
> >> CONFIG_PCI_DRIVERS_LEGACY") is to blame (Cc'ing paul), and the first bad
> >> commit would be commit eed0eabd12ef ("MIPS: generic: Introduce generic
> >> DT-based board support") which selects PCI_DRIVERS_GENERIC and is the
> >> only platform to do so. Both commits were first in v4.9-rc1 and I can
> >> reproduce this problem at that latter commit with the appropriate
> >> configuration.
> > 
> > Ah - yes if I recall correctly my assumption was that the MIPS-specific
> > struct pci_controller was only used by the MIPS-specific PCI drivers
> > under arch/mips/pci/, which are only built when configured for the
> > appropriate platform.
> > 
> > In this case use of that MIPS-specific struct pci_controller has spread
> > beyond arch/mips/ & the user can be configured in for platforms other
> > than the one that will actually use the driver, including the generic
> > platform which moves towards more generic PCI drivers in
> > drivers/pci/host/.
> > 
> >> But yes clearly the mentioned commit does also expose that existing
> >> problem more widely and to the default allmodconfig, and it looks like a
> >> reasonable approach for now, so if some mention of the other two commits
> >> is added:
> >>
> >> Reviewed-by: James Hogan <jhogan@kernel.org>
> > 
> > Likewise, with the "Fixes:" tag fixed:
> > 
> >      Reviewed-by: Paul Burton <paul.burton@mips.com>
> > 
> 
> Unfortunately, that alone doesn't fix the problem. SSB driver dependencies
> are also broken, and in much worse shape. I had to add dependencies in five
> places to get it to build, and the result is so messy that I won't even try
> to submit it.

Oh, thats interesting. When I tried this earlier I just added "&&
PCI_DRIVERS_LEGACY" to the SSB_PCIHOST_POSSIBLE dependencies, but I was
waiting for Paul's feedback before submitting a similar patch.

But that wasn't -next, it was mainline + mips fixes branch + individual
fixes:

> And if that is fixed, mips:allmodconfig still doesn't build -
> the next error is an undefined reference to physical_memsize in
> arch/mips/kernel/vpe-mt.o.

That one is fairly easy to fix properly, I'll hopefully submit something
this evening.

> 
> I wonder if I should just stop trying to build allmodconfig for mips.
> Any thoughts ?

With a few fixes applied it should be buildable I think. Sorry its been
late in the cycle before we've been able to get fixes merged.

Cheers
James

> 
> Guenter
> 
> > Thanks,
> >      Paul
> > 
> >> Having it in 4.15 would be great.
> >>
> >> Cheers
> >> James
> >>
> >>> Cc: Matt Redfearn <matt.redfearn@imgtec.com>
> >>> Cc: James Hogan <jhogan@kernel.org>
> >>> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> >>> ---
> >>> I am aware that this problem has been reported several times. I have
> >>> not been able to find a fix, but I may have missed it. If so, my
> >>> apologies for the noise.
> >>>
> >>> Also note that this is not the only fix required; commit d41e6858ba58c,
> >>> as simple as it looks like, does a pretty good job messing up
> >>> "mips:allmodconfig" builds.
> >>>
> >>>   drivers/bcma/Kconfig | 2 +-
> >>>   1 file changed, 1 insertion(+), 1 deletion(-)
> >>>
> >>> diff --git a/drivers/bcma/Kconfig b/drivers/bcma/Kconfig
> >>> index 02d78f6cecbb..ba8acca036df 100644
> >>> --- a/drivers/bcma/Kconfig
> >>> +++ b/drivers/bcma/Kconfig
> >>> @@ -55,7 +55,7 @@ config BCMA_DRIVER_PCI
> >>>   
> >>>   config BCMA_DRIVER_PCI_HOSTMODE
> >>>   	bool "Driver for PCI core working in hostmode"
> >>> -	depends on MIPS && BCMA_DRIVER_PCI
> >>> +	depends on MIPS && BCMA_DRIVER_PCI && PCI_DRIVERS_LEGACY
> >>>   	help
> >>>   	  PCI core hostmode operation (external PCI bus).
> >>>   
> >>> -- 
> >>> 2.7.4
> >>>
> > 
> > 
> > 
> 

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

* Re: [PATCH] bcma: Fix 'allmodconfig' and BCMA builds on MIPS targets
  2018-01-15 20:30       ` James Hogan
@ 2018-01-15 20:58         ` Guenter Roeck
  0 siblings, 0 replies; 10+ messages in thread
From: Guenter Roeck @ 2018-01-15 20:58 UTC (permalink / raw)
  To: James Hogan
  Cc: Paul Burton, Rafał Miłecki, linux-wireless,
	linux-kernel, Matt Redfearn, Linux MIPS Mailing List

On 01/15/2018 12:30 PM, James Hogan wrote:
> On Mon, Jan 15, 2018 at 12:05:48PM -0800, Guenter Roeck wrote:
>> On 01/15/2018 09:10 AM, Paul Burton wrote:
>>> Hello,
>>>
>>> On Mon, Jan 15, 2018 at 10:23:37AM +0000, James Hogan wrote:
>>>> On Sun, Jan 14, 2018 at 01:34:02PM -0800, Guenter Roeck wrote:
>>>>> Mips builds with BCMA host mode enabled fail in mainline and -next
>>>>> with:
>>>>>
>>>>> In file included from include/linux/bcma/bcma.h:10:0,
>>>>>                    from drivers/bcma/bcma_private.h:9,
>>>>> 		 from drivers/bcma/main.c:8:
>>>>> include/linux/bcma/bcma_driver_pci.h:218:24: error:
>>>>> 	field 'pci_controller' has incomplete type
>>>>>
>>>>> Bisect points to commit d41e6858ba58c ("MIPS: Kconfig: Set default MIPS
>>>>> system type as generic") as the culprit. Analysis shows that the commmit
>>>>> changes PCI configuration and enables PCI_DRIVERS_GENERIC. This in turn
>>>>> disables PCI_DRIVERS_LEGACY. 'struct pci_controller' is, however, only
>>>>> defined if PCI_DRIVERS_LEGACY is enabled.
>>>>>
>>>>> Ultimately that means that BCMA_DRIVER_PCI_HOSTMODE depends on
>>>>> PCI_DRIVERS_LEGACY. Add the missing dependency.
>>>>>
>>>>> Fixes: d41e6858ba58c ("MIPS: Kconfig: Set default MIPS system type as ...")
>>>>
>>>> Well, technically I think commit c5611df96804 ("MIPS: PCI: Introduce
>>>> CONFIG_PCI_DRIVERS_LEGACY") is to blame (Cc'ing paul), and the first bad
>>>> commit would be commit eed0eabd12ef ("MIPS: generic: Introduce generic
>>>> DT-based board support") which selects PCI_DRIVERS_GENERIC and is the
>>>> only platform to do so. Both commits were first in v4.9-rc1 and I can
>>>> reproduce this problem at that latter commit with the appropriate
>>>> configuration.
>>>
>>> Ah - yes if I recall correctly my assumption was that the MIPS-specific
>>> struct pci_controller was only used by the MIPS-specific PCI drivers
>>> under arch/mips/pci/, which are only built when configured for the
>>> appropriate platform.
>>>
>>> In this case use of that MIPS-specific struct pci_controller has spread
>>> beyond arch/mips/ & the user can be configured in for platforms other
>>> than the one that will actually use the driver, including the generic
>>> platform which moves towards more generic PCI drivers in
>>> drivers/pci/host/.
>>>
>>>> But yes clearly the mentioned commit does also expose that existing
>>>> problem more widely and to the default allmodconfig, and it looks like a
>>>> reasonable approach for now, so if some mention of the other two commits
>>>> is added:
>>>>
>>>> Reviewed-by: James Hogan <jhogan@kernel.org>
>>>
>>> Likewise, with the "Fixes:" tag fixed:
>>>
>>>       Reviewed-by: Paul Burton <paul.burton@mips.com>
>>>
>>
>> Unfortunately, that alone doesn't fix the problem. SSB driver dependencies
>> are also broken, and in much worse shape. I had to add dependencies in five
>> places to get it to build, and the result is so messy that I won't even try
>> to submit it.
> 
> Oh, thats interesting. When I tried this earlier I just added "&&
> PCI_DRIVERS_LEGACY" to the SSB_PCIHOST_POSSIBLE dependencies, but I was
> waiting for Paul's feedback before submitting a similar patch.
> 

You are right, that is much more straightforward than my attempted fix,
and it works.

> But that wasn't -next, it was mainline + mips fixes branch + individual
> fixes:
> 

Mine is mainline plus "MIPS: Fix CPS SMP NS16550 UART defaults"
which for some reason never made it into mainline. For the nightly builds,
I ended up modifying my buildripts to fix that up manually in the created
configuration file.

>> And if that is fixed, mips:allmodconfig still doesn't build -
>> the next error is an undefined reference to physical_memsize in
>> arch/mips/kernel/vpe-mt.o.
> 
> That one is fairly easy to fix properly, I'll hopefully submit something
> this evening.
> 
>>
>> I wonder if I should just stop trying to build allmodconfig for mips.
>> Any thoughts ?
> 
> With a few fixes applied it should be buildable I think. Sorry its been
> late in the cycle before we've been able to get fixes merged.
> 
Ok, I'll wait a bit longer before giving up on it.

Thanks,
Guenter

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

* Re: bcma: Fix 'allmodconfig' and BCMA builds on MIPS targets
  2018-01-14 21:34 [PATCH] bcma: Fix 'allmodconfig' and BCMA builds on MIPS targets Guenter Roeck
                   ` (2 preceding siblings ...)
  2018-01-15 10:23 ` James Hogan
@ 2018-01-16 19:15 ` Kalle Valo
  3 siblings, 0 replies; 10+ messages in thread
From: Kalle Valo @ 2018-01-16 19:15 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Rafał Miłecki, linux-wireless, linux-kernel,
	Guenter Roeck, Matt Redfearn, James Hogan

Guenter Roeck <linux@roeck-us.net> wrote:

> Mips builds with BCMA host mode enabled fail in mainline and -next
> with:
> 
> In file included from include/linux/bcma/bcma.h:10:0,
>                  from drivers/bcma/bcma_private.h:9,
> 		 from drivers/bcma/main.c:8:
> include/linux/bcma/bcma_driver_pci.h:218:24: error:
> 	field 'pci_controller' has incomplete type
> 
> Bisect points to commit d41e6858ba58c ("MIPS: Kconfig: Set default MIPS
> system type as generic") as the culprit. Analysis shows that the commmit
> changes PCI configuration and enables PCI_DRIVERS_GENERIC. This in turn
> disables PCI_DRIVERS_LEGACY. 'struct pci_controller' is, however, only
> defined if PCI_DRIVERS_LEGACY is enabled.
> 
> Ultimately that means that BCMA_DRIVER_PCI_HOSTMODE depends on
> PCI_DRIVERS_LEGACY. Add the missing dependency.
> 
> Fixes: d41e6858ba58c ("MIPS: Kconfig: Set default MIPS system type as ...")
> Cc: Matt Redfearn <matt.redfearn@imgtec.com>
> Cc: James Hogan <jhogan@kernel.org>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> Reviewed-by: James Hogan <jhogan@kernel.org>

Patch applied to wireless-drivers.git, thanks.

664eadd6f44b bcma: Fix 'allmodconfig' and BCMA builds on MIPS targets

-- 
https://patchwork.kernel.org/patch/10162839/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

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

end of thread, other threads:[~2018-01-16 19:15 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-14 21:34 [PATCH] bcma: Fix 'allmodconfig' and BCMA builds on MIPS targets Guenter Roeck
2018-01-14 21:40 ` Guenter Roeck
2018-01-15 10:11   ` Kalle Valo
2018-01-15 10:03 ` Kalle Valo
2018-01-15 10:23 ` James Hogan
2018-01-15 17:10   ` Paul Burton
2018-01-15 20:05     ` Guenter Roeck
2018-01-15 20:30       ` James Hogan
2018-01-15 20:58         ` Guenter Roeck
2018-01-16 19:15 ` Kalle Valo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.