linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] bcma: Prevent build of PCI host features in module
@ 2018-01-12 14:25 Matt Redfearn
  2018-01-15 10:07 ` Kalle Valo
  2018-02-28 14:36 ` Kalle Valo
  0 siblings, 2 replies; 4+ messages in thread
From: Matt Redfearn @ 2018-01-12 14:25 UTC (permalink / raw)
  To: Rafał Miłecki; +Cc: linux-wireless, Matt Redfearn, linux-kernel

Attempting to build bcma.ko with BCMA_DRIVER_PCI_HOSTMODE=y results in
a build error due to use of symbols not exported from vmlinux:

ERROR: "pcibios_enable_device" [drivers/bcma/bcma.ko] undefined!
ERROR: "register_pci_controller" [drivers/bcma/bcma.ko] undefined!
make[1]: *** [scripts/Makefile.modpost:92: __modpost] Error 1

To prevent this, don't allow the host mode feature to be built if
CONFIG_BCMA=m

Signed-off-by: Matt Redfearn <matt.redfearn@mips.com>

---

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

diff --git a/drivers/bcma/Kconfig b/drivers/bcma/Kconfig
index 02d78f6cecbb..4294784b9cf1 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 && BCMA = y
 	help
 	  PCI core hostmode operation (external PCI bus).
 
-- 
2.7.4

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

* Re: [PATCH] bcma: Prevent build of PCI host features in module
  2018-01-12 14:25 [PATCH] bcma: Prevent build of PCI host features in module Matt Redfearn
@ 2018-01-15 10:07 ` Kalle Valo
  2018-01-15 11:16   ` Matt Redfearn
  2018-02-28 14:36 ` Kalle Valo
  1 sibling, 1 reply; 4+ messages in thread
From: Kalle Valo @ 2018-01-15 10:07 UTC (permalink / raw)
  To: Matt Redfearn; +Cc: Rafał Miłecki, linux-wireless, linux-kernel

Matt Redfearn <matt.redfearn@mips.com> writes:

> Attempting to build bcma.ko with BCMA_DRIVER_PCI_HOSTMODE=y results in
> a build error due to use of symbols not exported from vmlinux:
>
> ERROR: "pcibios_enable_device" [drivers/bcma/bcma.ko] undefined!
> ERROR: "register_pci_controller" [drivers/bcma/bcma.ko] undefined!
> make[1]: *** [scripts/Makefile.modpost:92: __modpost] Error 1
>
> To prevent this, don't allow the host mode feature to be built if
> CONFIG_BCMA=m
>
> Signed-off-by: Matt Redfearn <matt.redfearn@mips.com>
>
> ---
>
>  drivers/bcma/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/bcma/Kconfig b/drivers/bcma/Kconfig
> index 02d78f6cecbb..4294784b9cf1 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 && BCMA = y

Is this a new regression? Do you know the commit which broke this? 

Is it somehow related to this:

bcma: Fix 'allmodconfig' and BCMA builds on MIPS targets
https://patchwork.kernel.org/patch/10162839/

Or are these two separate issues?

-- 
Kalle Valo

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

* Re: [PATCH] bcma: Prevent build of PCI host features in module
  2018-01-15 10:07 ` Kalle Valo
@ 2018-01-15 11:16   ` Matt Redfearn
  0 siblings, 0 replies; 4+ messages in thread
From: Matt Redfearn @ 2018-01-15 11:16 UTC (permalink / raw)
  To: Kalle Valo
  Cc: Rafał Miłecki, linux-wireless, linux-kernel,
	Guenter Roeck, Linux MIPS Mailing List

Hi Kalle,

On 15/01/18 10:07, Kalle Valo wrote:
> Matt Redfearn <matt.redfearn@mips.com> writes:
> 
>> Attempting to build bcma.ko with BCMA_DRIVER_PCI_HOSTMODE=y results in
>> a build error due to use of symbols not exported from vmlinux:
>>
>> ERROR: "pcibios_enable_device" [drivers/bcma/bcma.ko] undefined!
>> ERROR: "register_pci_controller" [drivers/bcma/bcma.ko] undefined!
>> make[1]: *** [scripts/Makefile.modpost:92: __modpost] Error 1
>>
>> To prevent this, don't allow the host mode feature to be built if
>> CONFIG_BCMA=m
>>
>> Signed-off-by: Matt Redfearn <matt.redfearn@mips.com>
>>
>> ---
>>
>>   drivers/bcma/Kconfig | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/bcma/Kconfig b/drivers/bcma/Kconfig
>> index 02d78f6cecbb..4294784b9cf1 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 && BCMA = y
> 
> Is this a new regression? Do you know the commit which broke this?

As far as I can see, pcibios_enable_device and register_pci_controller 
have never being exported symbols from vmlinux, and an allmodconfig 
build with CONFIG_MIPS_COBALT=y (MIPS cobalt platform) which attempts to 
put this this functionality into a module would never have linked 
successfully. As such it can be traced back to when this functionality 
was added, 49dc9577155576b10ff79f0c1486c816b01f58bf ("bcma: add PCIe 
host controller").

> 
> Is it somehow related to this:
> 
> bcma: Fix 'allmodconfig' and BCMA builds on MIPS targets
> https://patchwork.kernel.org/patch/10162839/
> 
> Or are these two separate issues?
> 

Separate issues - that one fixes allmodconfig when CONFIG_MIPS_GENERIC=y 
(MIPS generic platform) which does not define the struct pci_controller 
- that error was really introduced when that struct definition was 
removed for the generic platform by 
c5611df968047fb0b38156497b4242730ef66108 ("MIPS: PCI: Introduce 
CONFIG_PCI_DRIVERS_LEGACY").

I think both patches are valid since they fix errors building 
allmodconfig on 2 separate MIPS platforms.

Thanks,
Matt

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

* Re: bcma: Prevent build of PCI host features in module
  2018-01-12 14:25 [PATCH] bcma: Prevent build of PCI host features in module Matt Redfearn
  2018-01-15 10:07 ` Kalle Valo
@ 2018-02-28 14:36 ` Kalle Valo
  1 sibling, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2018-02-28 14:36 UTC (permalink / raw)
  To: Matt Redfearn
  Cc: Rafał Miłecki, linux-wireless, Matt Redfearn,
	linux-kernel

Matt Redfearn <matt.redfearn@mips.com> wrote:

> Attempting to build bcma.ko with BCMA_DRIVER_PCI_HOSTMODE=y results in
> a build error due to use of symbols not exported from vmlinux:
> 
> ERROR: "pcibios_enable_device" [drivers/bcma/bcma.ko] undefined!
> ERROR: "register_pci_controller" [drivers/bcma/bcma.ko] undefined!
> make[1]: *** [scripts/Makefile.modpost:92: __modpost] Error 1
> 
> To prevent this, don't allow the host mode feature to be built if
> CONFIG_BCMA=m
> 
> Signed-off-by: Matt Redfearn <matt.redfearn@mips.com>

This does not apply to wireless-drivers-next anymore. Also please CC:

linux-mips@linux-mips.org
James Hogan <jhogan@kernel.org>

Recorded preimage for 'drivers/bcma/Kconfig'
error: Failed to merge in the changes.
Applying: bcma: Prevent build of PCI host features in module
Using index info to reconstruct a base tree...
M	drivers/bcma/Kconfig
Falling back to patching base and 3-way merge...
Auto-merging drivers/bcma/Kconfig
CONFLICT (content): Merge conflict in drivers/bcma/Kconfig
Patch failed at 0001 bcma: Prevent build of PCI host features in module
The copy of the patch that failed is found in: .git/rebase-apply/patch

Patch set to Changes Requested.

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

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

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

end of thread, other threads:[~2018-02-28 14:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-12 14:25 [PATCH] bcma: Prevent build of PCI host features in module Matt Redfearn
2018-01-15 10:07 ` Kalle Valo
2018-01-15 11:16   ` Matt Redfearn
2018-02-28 14:36 ` Kalle Valo

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