diff mbox series

mtd: parsers: bcm63xx: Do not make it modular

Message ID 20200929172726.30469-1-f.fainelli@gmail.com
State Accepted
Headers show
Series mtd: parsers: bcm63xx: Do not make it modular | expand

Commit Message

Florian Fainelli Sept. 29, 2020, 5:27 p.m. UTC
With commit 91e81150d388 ("mtd: parsers: bcm63xx: simplify CFE
detection"), we generate a reference to fw_arg3 which is the fourth
firmware/command line argument on MIPS platforms. That symbol is not
exported and would cause a linking failure.

The parser is typically necessary to boot a BCM63xx-based system anyway
so having it be part of the kernel image makes sense, therefore make it
'bool' instead of 'tristate'.

Fixes: 91e81150d388 ("mtd: parsers: bcm63xx: simplify CFE detection")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 drivers/mtd/parsers/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Miquel Raynal Oct. 2, 2020, 7:15 a.m. UTC | #1
On Tue, 2020-09-29 at 17:27:21 UTC, Florian Fainelli wrote:
> With commit 91e81150d388 ("mtd: parsers: bcm63xx: simplify CFE
> detection"), we generate a reference to fw_arg3 which is the fourth
> firmware/command line argument on MIPS platforms. That symbol is not
> exported and would cause a linking failure.
> 
> The parser is typically necessary to boot a BCM63xx-based system anyway
> so having it be part of the kernel image makes sense, therefore make it
> 'bool' instead of 'tristate'.
> 
> Fixes: 91e81150d388 ("mtd: parsers: bcm63xx: simplify CFE detection")
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.

Miquel
Guenter Roeck Oct. 11, 2020, 2:14 p.m. UTC | #2
On Tue, Sep 29, 2020 at 10:27:21AM -0700, Florian Fainelli wrote:
> With commit 91e81150d388 ("mtd: parsers: bcm63xx: simplify CFE
> detection"), we generate a reference to fw_arg3 which is the fourth
> firmware/command line argument on MIPS platforms. That symbol is not
> exported and would cause a linking failure.
> 
> The parser is typically necessary to boot a BCM63xx-based system anyway
> so having it be part of the kernel image makes sense, therefore make it
> 'bool' instead of 'tristate'.
> 
> Fixes: 91e81150d388 ("mtd: parsers: bcm63xx: simplify CFE detection")
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>

What happened with this patch ? The build failure is still seen in mainline
and in next-20201009.

Guenter

> ---
>  drivers/mtd/parsers/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/parsers/Kconfig b/drivers/mtd/parsers/Kconfig
> index f98363c9b363..e72354322f62 100644
> --- a/drivers/mtd/parsers/Kconfig
> +++ b/drivers/mtd/parsers/Kconfig
> @@ -12,7 +12,7 @@ config MTD_BCM47XX_PARTS
>  	  boards.
>  
>  config MTD_BCM63XX_PARTS
> -	tristate "BCM63XX CFE partitioning parser"
> +	bool "BCM63XX CFE partitioning parser"
>  	depends on BCM63XX || BMIPS_GENERIC || COMPILE_TEST
>  	select CRC32
>  	select MTD_PARSER_IMAGETAG
> -- 
> 2.25.1
>
Miquel Raynal Oct. 12, 2020, 7:04 a.m. UTC | #3
Hi Guenter,

Guenter Roeck <linux@roeck-us.net> wrote on Sun, 11 Oct 2020 07:14:47
-0700:

> On Tue, Sep 29, 2020 at 10:27:21AM -0700, Florian Fainelli wrote:
> > With commit 91e81150d388 ("mtd: parsers: bcm63xx: simplify CFE
> > detection"), we generate a reference to fw_arg3 which is the fourth
> > firmware/command line argument on MIPS platforms. That symbol is not
> > exported and would cause a linking failure.
> > 
> > The parser is typically necessary to boot a BCM63xx-based system anyway
> > so having it be part of the kernel image makes sense, therefore make it
> > 'bool' instead of 'tristate'.
> > 
> > Fixes: 91e81150d388 ("mtd: parsers: bcm63xx: simplify CFE detection")
> > Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>  
> 
> What happened with this patch ? The build failure is still seen in mainline
> and in next-20201009.

It has been applied on mtd/next:
https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git/log/?h=mtd/next
(I don't remember when though)
Guenter Roeck Oct. 12, 2020, 1:24 p.m. UTC | #4
On Mon, Oct 12, 2020 at 09:04:20AM +0200, Miquel Raynal wrote:
> Hi Guenter,
> 
> Guenter Roeck <linux@roeck-us.net> wrote on Sun, 11 Oct 2020 07:14:47
> -0700:
> 
> > On Tue, Sep 29, 2020 at 10:27:21AM -0700, Florian Fainelli wrote:
> > > With commit 91e81150d388 ("mtd: parsers: bcm63xx: simplify CFE
> > > detection"), we generate a reference to fw_arg3 which is the fourth
> > > firmware/command line argument on MIPS platforms. That symbol is not
> > > exported and would cause a linking failure.
> > > 
> > > The parser is typically necessary to boot a BCM63xx-based system anyway
> > > so having it be part of the kernel image makes sense, therefore make it
> > > 'bool' instead of 'tristate'.
> > > 
> > > Fixes: 91e81150d388 ("mtd: parsers: bcm63xx: simplify CFE detection")
> > > Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>  
> > 
> > What happened with this patch ? The build failure is still seen in mainline
> > and in next-20201009.
> 
> It has been applied on mtd/next:
> https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git/log/?h=mtd/next
> (I don't remember when though)

Hmm, lets see ...

Ah, I see: mips:allmodconfig now fails to build in -next for a different
reason.

Error log:
In file included from <command-line>:
arch/mips/mm/init.c: In function 'mem_init':
include/linux/compiler_types.h:319:38: error: call to '__compiletime_assert_331'
	declared with attribute error: BUILD_BUG_ON failed: IS_ENABLED(CONFIG_32BIT) && (_PFN_SHIFT > PAGE_SHIFT)

I'll send a separate report on that (if it wasn't reported before).

Anyway, any reason for not applying this fix to mainline, ie why the
mips:allmodconfig build failure was not fixed in v5.9 ?

Guenter
diff mbox series

Patch

diff --git a/drivers/mtd/parsers/Kconfig b/drivers/mtd/parsers/Kconfig
index f98363c9b363..e72354322f62 100644
--- a/drivers/mtd/parsers/Kconfig
+++ b/drivers/mtd/parsers/Kconfig
@@ -12,7 +12,7 @@  config MTD_BCM47XX_PARTS
 	  boards.
 
 config MTD_BCM63XX_PARTS
-	tristate "BCM63XX CFE partitioning parser"
+	bool "BCM63XX CFE partitioning parser"
 	depends on BCM63XX || BMIPS_GENERIC || COMPILE_TEST
 	select CRC32
 	select MTD_PARSER_IMAGETAG