* [PATCH] ARM: omap1: set ARCH_OMAP1_ANY for ARCH_OMAP1
@ 2022-11-06 6:25 Randy Dunlap
2022-11-06 7:43 ` Arnd Bergmann
0 siblings, 1 reply; 6+ messages in thread
From: Randy Dunlap @ 2022-11-06 6:25 UTC (permalink / raw)
To: linux-kernel
Cc: Randy Dunlap, kernel test robot, Aaro Koskinen,
Janusz Krzysztofik, Tony Lindgren, Russell King, Arnd Bergmann,
linux-arm-kernel, linux-omap
Fix a build error by setting ARCH_OMAP1_ANY Kconfig symbol.
Fixes this build error:
arm-linux-gnueabi-ld: drivers/video/backlight/omap1_bl.o: in function `omapbl_probe':
omap1_bl.c:(.text+0x1b4): undefined reference to `omap_cfg_reg'
Fixes: 7036440eab3e ("ARM: omap1: enable multiplatform")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: kernel test robot <lkp@intel.com>
Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Janusz Krzysztofik <jmkrzyszt@gmail.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-omap@vger.kernel.org
---
arch/arm/mach-omap1/Kconfig | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff -- a/arch/arm/mach-omap1/Kconfig b/arch/arm/mach-omap1/Kconfig
--- a/arch/arm/mach-omap1/Kconfig
+++ b/arch/arm/mach-omap1/Kconfig
@@ -47,7 +47,8 @@ config ARCH_OMAP16XX
config ARCH_OMAP1_ANY
select ARCH_OMAP
- def_bool ARCH_OMAP730 || ARCH_OMAP850 || ARCH_OMAP15XX || ARCH_OMAP16XX
+ def_bool ARCH_OMAP730 || ARCH_OMAP850 || ARCH_OMAP15XX || \
+ ARCH_OMAP16XX || ARCH_OMAP1
config ARCH_OMAP
bool
_______________________________________________
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] ARM: omap1: set ARCH_OMAP1_ANY for ARCH_OMAP1 2022-11-06 6:25 [PATCH] ARM: omap1: set ARCH_OMAP1_ANY for ARCH_OMAP1 Randy Dunlap @ 2022-11-06 7:43 ` Arnd Bergmann 2022-11-06 10:26 ` Russell King (Oracle) 0 siblings, 1 reply; 6+ messages in thread From: Arnd Bergmann @ 2022-11-06 7:43 UTC (permalink / raw) To: Randy Dunlap, linux-kernel Cc: kernel test robot, Aaro Koskinen, Janusz Krzysztofik, Tony Lindgren, Russell King, linux-arm-kernel, Linux-OMAP On Sun, Nov 6, 2022, at 07:25, Randy Dunlap wrote: > Fix a build error by setting ARCH_OMAP1_ANY Kconfig symbol. > Fixes this build error: > > arm-linux-gnueabi-ld: drivers/video/backlight/omap1_bl.o: in function > `omapbl_probe': > omap1_bl.c:(.text+0x1b4): undefined reference to `omap_cfg_reg' > > Fixes: 7036440eab3e ("ARM: omap1: enable multiplatform") > Signed-off-by: Randy Dunlap <rdunlap@infradead.org> > Reported-by: kernel test robot <lkp@intel.com> > Cc: Aaro Koskinen <aaro.koskinen@iki.fi> > Cc: Janusz Krzysztofik <jmkrzyszt@gmail.com> > Cc: Tony Lindgren <tony@atomide.com> > Cc: Russell King <linux@armlinux.org.uk> > Cc: Arnd Bergmann <arnd@arndb.de> > Cc: linux-arm-kernel@lists.infradead.org > Cc: linux-omap@vger.kernel.org > --- > arch/arm/mach-omap1/Kconfig | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff -- a/arch/arm/mach-omap1/Kconfig b/arch/arm/mach-omap1/Kconfig > --- a/arch/arm/mach-omap1/Kconfig > +++ b/arch/arm/mach-omap1/Kconfig > @@ -47,7 +47,8 @@ config ARCH_OMAP16XX > > config ARCH_OMAP1_ANY > select ARCH_OMAP > - def_bool ARCH_OMAP730 || ARCH_OMAP850 || ARCH_OMAP15XX || ARCH_OMAP16XX > + def_bool ARCH_OMAP730 || ARCH_OMAP850 || ARCH_OMAP15XX || \ > + ARCH_OMAP16XX || ARCH_OMAP1 I think this would introduce other build failures, because it makes ARCH_OMAP1_ANY the same as ARCH_OMAP1, bringing back the problems I solved with 615dce5bf736 ("ARM: omap1: fix build with no SoC selected"). What you probably see here is a preexisting bug that bisects to 7036440eab3e because of the contents of your .config file that no longer enable ARCH_OMAP1 without 7036440eab3e. I have not tested it, but I suspect what we want instead is the change below, limiting OMAP_MUX and related symbols to configs that enable at least one of the OMAP1 variants. Arnd --- a/arch/arm/mach-omap1/Kconfig +++ b/arch/arm/mach-omap1/Kconfig @@ -49,7 +49,7 @@ config ARCH_OMAP1_ANY select ARCH_OMAP def_bool ARCH_OMAP730 || ARCH_OMAP850 || ARCH_OMAP15XX || ARCH_OMAP16XX -config ARCH_OMAP +config ARCH_OMAP1_ANY bool comment "OMAP Feature Selections" _______________________________________________ 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] ARM: omap1: set ARCH_OMAP1_ANY for ARCH_OMAP1 2022-11-06 7:43 ` Arnd Bergmann @ 2022-11-06 10:26 ` Russell King (Oracle) 2022-11-06 10:37 ` Arnd Bergmann 0 siblings, 1 reply; 6+ messages in thread From: Russell King (Oracle) @ 2022-11-06 10:26 UTC (permalink / raw) To: Arnd Bergmann Cc: Randy Dunlap, linux-kernel, kernel test robot, Aaro Koskinen, Janusz Krzysztofik, Tony Lindgren, linux-arm-kernel, Linux-OMAP On Sun, Nov 06, 2022 at 08:43:50AM +0100, Arnd Bergmann wrote: > --- a/arch/arm/mach-omap1/Kconfig > +++ b/arch/arm/mach-omap1/Kconfig > @@ -49,7 +49,7 @@ config ARCH_OMAP1_ANY > select ARCH_OMAP > def_bool ARCH_OMAP730 || ARCH_OMAP850 || ARCH_OMAP15XX || ARCH_OMAP16XX > > -config ARCH_OMAP > +config ARCH_OMAP1_ANY This patch can't be right - look at the first line of context above, you have symbols that select ARCH_OMAP and you've just removed the definition of ARCH_OMAP. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last! _______________________________________________ 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] ARM: omap1: set ARCH_OMAP1_ANY for ARCH_OMAP1 2022-11-06 10:26 ` Russell King (Oracle) @ 2022-11-06 10:37 ` Arnd Bergmann 2022-11-06 11:32 ` Arnd Bergmann 0 siblings, 1 reply; 6+ messages in thread From: Arnd Bergmann @ 2022-11-06 10:37 UTC (permalink / raw) To: Russell King Cc: Randy Dunlap, linux-kernel, kernel test robot, Aaro Koskinen, Janusz Krzysztofik, Tony Lindgren, linux-arm-kernel, Linux-OMAP On Sun, Nov 6, 2022, at 11:26, Russell King (Oracle) wrote: > On Sun, Nov 06, 2022 at 08:43:50AM +0100, Arnd Bergmann wrote: >> --- a/arch/arm/mach-omap1/Kconfig >> +++ b/arch/arm/mach-omap1/Kconfig >> @@ -49,7 +49,7 @@ config ARCH_OMAP1_ANY >> select ARCH_OMAP >> def_bool ARCH_OMAP730 || ARCH_OMAP850 || ARCH_OMAP15XX || ARCH_OMAP16XX >> >> -config ARCH_OMAP >> +config ARCH_OMAP1_ANY > > This patch can't be right - look at the first line of context above, you > have symbols that select ARCH_OMAP and you've just removed the > definition of ARCH_OMAP. Right, I misread this, I thought this was an 'if ARCH_OMAP' block instead of the Kconfig symbol. Part of the problem is now is possibly that there are two symbols with that name now, I'll have to try to reproduce the problem first and then see what caused it originally. Arnd _______________________________________________ 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] ARM: omap1: set ARCH_OMAP1_ANY for ARCH_OMAP1 2022-11-06 10:37 ` Arnd Bergmann @ 2022-11-06 11:32 ` Arnd Bergmann 2022-11-07 0:55 ` Randy Dunlap 0 siblings, 1 reply; 6+ messages in thread From: Arnd Bergmann @ 2022-11-06 11:32 UTC (permalink / raw) To: Russell King Cc: Randy Dunlap, linux-kernel, kernel test robot, Aaro Koskinen, Janusz Krzysztofik, Tony Lindgren, linux-arm-kernel, Linux-OMAP On Sun, Nov 6, 2022, at 11:37, Arnd Bergmann wrote: > On Sun, Nov 6, 2022, at 11:26, Russell King (Oracle) wrote: >> On Sun, Nov 06, 2022 at 08:43:50AM +0100, Arnd Bergmann wrote: >>> --- a/arch/arm/mach-omap1/Kconfig >>> +++ b/arch/arm/mach-omap1/Kconfig >>> @@ -49,7 +49,7 @@ config ARCH_OMAP1_ANY >>> select ARCH_OMAP >>> def_bool ARCH_OMAP730 || ARCH_OMAP850 || ARCH_OMAP15XX || ARCH_OMAP16XX >>> >>> -config ARCH_OMAP >>> +config ARCH_OMAP1_ANY >> >> This patch can't be right - look at the first line of context above, you >> have symbols that select ARCH_OMAP and you've just removed the >> definition of ARCH_OMAP. > > Right, I misread this, I thought this was an 'if ARCH_OMAP' block > instead of the Kconfig symbol. Part of the problem is now is > possibly that there are two symbols with that name now, I'll have > to try to reproduce the problem first and then see what caused it > originally. It seems the root cause was actually 804f7f19c2e2 ("fbdev: omap: avoid using mach/*.h files"), where I started allowing building with CONFIG_COMPILE_TEST, but this fails when ARCH_OMAP1_ANY is disabled, as Randy correctly found. We could tighten this gain by adding something like depends on ARCH_OMAP1_ANY || !OMAP_MUX to still allow compile-testing but specifically avoiding the broken case. I think we have the same problem in the pcmcia and spi-uwire drivers, so maybe something like this would be a better approach: --- a/include/linux/soc/ti/omap1-mux.h +++ b/include/linux/soc/ti/omap1-mux.h @@ -302,7 +302,7 @@ enum omap1xxx_index { }; -#ifdef CONFIG_OMAP_MUX +#if defined(CONFIG_OMAP_MUX) && defined(CONFIG_ARCH_OMAP1_ANY) extern int omap_cfg_reg(unsigned long reg_cfg); #else static inline int omap_cfg_reg(unsigned long reg_cfg) { return 0; } Arnd _______________________________________________ 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] ARM: omap1: set ARCH_OMAP1_ANY for ARCH_OMAP1 2022-11-06 11:32 ` Arnd Bergmann @ 2022-11-07 0:55 ` Randy Dunlap 0 siblings, 0 replies; 6+ messages in thread From: Randy Dunlap @ 2022-11-07 0:55 UTC (permalink / raw) To: Arnd Bergmann, Russell King Cc: linux-kernel, kernel test robot, Aaro Koskinen, Janusz Krzysztofik, Tony Lindgren, linux-arm-kernel, Linux-OMAP On 11/6/22 03:32, Arnd Bergmann wrote: > On Sun, Nov 6, 2022, at 11:37, Arnd Bergmann wrote: >> On Sun, Nov 6, 2022, at 11:26, Russell King (Oracle) wrote: >>> On Sun, Nov 06, 2022 at 08:43:50AM +0100, Arnd Bergmann wrote: >>>> --- a/arch/arm/mach-omap1/Kconfig >>>> +++ b/arch/arm/mach-omap1/Kconfig >>>> @@ -49,7 +49,7 @@ config ARCH_OMAP1_ANY >>>> select ARCH_OMAP >>>> def_bool ARCH_OMAP730 || ARCH_OMAP850 || ARCH_OMAP15XX || ARCH_OMAP16XX >>>> >>>> -config ARCH_OMAP >>>> +config ARCH_OMAP1_ANY >>> >>> This patch can't be right - look at the first line of context above, you >>> have symbols that select ARCH_OMAP and you've just removed the >>> definition of ARCH_OMAP. >> >> Right, I misread this, I thought this was an 'if ARCH_OMAP' block >> instead of the Kconfig symbol. Part of the problem is now is >> possibly that there are two symbols with that name now, I'll have >> to try to reproduce the problem first and then see what caused it >> originally. > > It seems the root cause was actually 804f7f19c2e2 ("fbdev: omap: > avoid using mach/*.h files"), where I started allowing building with > CONFIG_COMPILE_TEST, but this fails when ARCH_OMAP1_ANY is disabled, > as Randy correctly found. > > We could tighten this gain by adding something like > > depends on ARCH_OMAP1_ANY || !OMAP_MUX > > to still allow compile-testing but specifically avoiding the > broken case. I think we have the same problem in the pcmcia and > spi-uwire drivers, so maybe something like this would be > a better approach: > > --- a/include/linux/soc/ti/omap1-mux.h > +++ b/include/linux/soc/ti/omap1-mux.h > @@ -302,7 +302,7 @@ enum omap1xxx_index { > > }; > > -#ifdef CONFIG_OMAP_MUX > +#if defined(CONFIG_OMAP_MUX) && defined(CONFIG_ARCH_OMAP1_ANY) > extern int omap_cfg_reg(unsigned long reg_cfg); > #else > static inline int omap_cfg_reg(unsigned long reg_cfg) { return 0; } That seems to work. Push it into -next and see what happens. :) -- ~Randy _______________________________________________ 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
end of thread, other threads:[~2022-11-07 0:56 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2022-11-06 6:25 [PATCH] ARM: omap1: set ARCH_OMAP1_ANY for ARCH_OMAP1 Randy Dunlap 2022-11-06 7:43 ` Arnd Bergmann 2022-11-06 10:26 ` Russell King (Oracle) 2022-11-06 10:37 ` Arnd Bergmann 2022-11-06 11:32 ` Arnd Bergmann 2022-11-07 0:55 ` Randy Dunlap
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox