Linux-Renesas-SoC Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] power: reset: vexpress: fix build issue
@ 2020-05-22 22:01 Anders Roxell
  2020-05-22 22:52 ` Rob Herring
  2020-05-24 22:20 ` Nathan Chancellor
  0 siblings, 2 replies; 7+ messages in thread
From: Anders Roxell @ 2020-05-22 22:01 UTC (permalink / raw)
  To: geert+renesas, magnus.damm
  Cc: linux-renesas-soc, sre, robh, linux-kernel, Anders Roxell

An allmodconfig kernel makes CONFIG_VEXPRESS_CONFIG a module and
CONFIG_POWER_RESET_VEXPRESS builtin. That makes us see this build
error:

aarch64-linux-gnu-ld: drivers/power/reset/vexpress-poweroff.o: in function `vexpress_reset_probe':
../drivers/power/reset/vexpress-poweroff.c:119: undefined reference to `devm_regmap_init_vexpress_config'
../drivers/power/reset/vexpress-poweroff.c:119:(.text+0x48c): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol
`devm_regmap_init_vexpress_config'
make[1]: *** [/srv/src/kernel/next/Makefile:1126: vmlinux] Error 1

Rework so that POWER_RESET_VEXPRESS depends on 'VEXPRESS_CONFIG=y'.

Fixes: d06cfe3f123c ("bus: vexpress-config: Merge vexpress-syscfg into vexpress-config")
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
---
 drivers/power/reset/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/power/reset/Kconfig b/drivers/power/reset/Kconfig
index 4dfac618b942..f07b982c8dff 100644
--- a/drivers/power/reset/Kconfig
+++ b/drivers/power/reset/Kconfig
@@ -191,7 +191,7 @@ config POWER_RESET_VERSATILE
 config POWER_RESET_VEXPRESS
 	bool "ARM Versatile Express power-off and reset driver"
 	depends on ARM || ARM64
-	depends on VEXPRESS_CONFIG
+	depends on VEXPRESS_CONFIG=y
 	help
 	  Power off and reset support for the ARM Ltd. Versatile
 	  Express boards.
-- 
2.26.2


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

* Re: [PATCH] power: reset: vexpress: fix build issue
  2020-05-22 22:01 [PATCH] power: reset: vexpress: fix build issue Anders Roxell
@ 2020-05-22 22:52 ` Rob Herring
  2020-05-24 22:20 ` Nathan Chancellor
  1 sibling, 0 replies; 7+ messages in thread
From: Rob Herring @ 2020-05-22 22:52 UTC (permalink / raw)
  To: Anders Roxell
  Cc: Geert Uytterhoeven, Magnus Damm,
	open list:MEDIA DRIVERS FOR RENESAS - FCP, Sebastian Reichel,
	linux-kernel

On Fri, May 22, 2020 at 4:01 PM Anders Roxell <anders.roxell@linaro.org> wrote:
>

It's soc@kernel.org that this needs to go to with an explicit request
for them to apply. Please resend so it gets in their Patchwork.

> An allmodconfig kernel makes CONFIG_VEXPRESS_CONFIG a module and
> CONFIG_POWER_RESET_VEXPRESS builtin. That makes us see this build
> error:
>
> aarch64-linux-gnu-ld: drivers/power/reset/vexpress-poweroff.o: in function `vexpress_reset_probe':
> ../drivers/power/reset/vexpress-poweroff.c:119: undefined reference to `devm_regmap_init_vexpress_config'
> ../drivers/power/reset/vexpress-poweroff.c:119:(.text+0x48c): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol
> `devm_regmap_init_vexpress_config'
> make[1]: *** [/srv/src/kernel/next/Makefile:1126: vmlinux] Error 1
>
> Rework so that POWER_RESET_VEXPRESS depends on 'VEXPRESS_CONFIG=y'.
>
> Fixes: d06cfe3f123c ("bus: vexpress-config: Merge vexpress-syscfg into vexpress-config")
> Acked-by: Rob Herring <robh@kernel.org>
> Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
> ---
>  drivers/power/reset/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/power/reset/Kconfig b/drivers/power/reset/Kconfig
> index 4dfac618b942..f07b982c8dff 100644
> --- a/drivers/power/reset/Kconfig
> +++ b/drivers/power/reset/Kconfig
> @@ -191,7 +191,7 @@ config POWER_RESET_VERSATILE
>  config POWER_RESET_VEXPRESS
>         bool "ARM Versatile Express power-off and reset driver"
>         depends on ARM || ARM64
> -       depends on VEXPRESS_CONFIG
> +       depends on VEXPRESS_CONFIG=y
>         help
>           Power off and reset support for the ARM Ltd. Versatile
>           Express boards.
> --
> 2.26.2
>

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

* Re: [PATCH] power: reset: vexpress: fix build issue
  2020-05-22 22:01 [PATCH] power: reset: vexpress: fix build issue Anders Roxell
  2020-05-22 22:52 ` Rob Herring
@ 2020-05-24 22:20 ` Nathan Chancellor
  2020-05-25 23:37   ` Valdis Klētnieks
  1 sibling, 1 reply; 7+ messages in thread
From: Nathan Chancellor @ 2020-05-24 22:20 UTC (permalink / raw)
  To: Anders Roxell
  Cc: geert+renesas, magnus.damm, linux-renesas-soc, sre, robh, linux-kernel

On Sat, May 23, 2020 at 12:01:03AM +0200, Anders Roxell wrote:
> An allmodconfig kernel makes CONFIG_VEXPRESS_CONFIG a module and
> CONFIG_POWER_RESET_VEXPRESS builtin. That makes us see this build
> error:
> 
> aarch64-linux-gnu-ld: drivers/power/reset/vexpress-poweroff.o: in function `vexpress_reset_probe':
> ../drivers/power/reset/vexpress-poweroff.c:119: undefined reference to `devm_regmap_init_vexpress_config'
> ../drivers/power/reset/vexpress-poweroff.c:119:(.text+0x48c): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol
> `devm_regmap_init_vexpress_config'
> make[1]: *** [/srv/src/kernel/next/Makefile:1126: vmlinux] Error 1
> 
> Rework so that POWER_RESET_VEXPRESS depends on 'VEXPRESS_CONFIG=y'.
> 
> Fixes: d06cfe3f123c ("bus: vexpress-config: Merge vexpress-syscfg into vexpress-config")
> Acked-by: Rob Herring <robh@kernel.org>
> Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
> ---
>  drivers/power/reset/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/power/reset/Kconfig b/drivers/power/reset/Kconfig
> index 4dfac618b942..f07b982c8dff 100644
> --- a/drivers/power/reset/Kconfig
> +++ b/drivers/power/reset/Kconfig
> @@ -191,7 +191,7 @@ config POWER_RESET_VERSATILE
>  config POWER_RESET_VEXPRESS
>  	bool "ARM Versatile Express power-off and reset driver"
>  	depends on ARM || ARM64
> -	depends on VEXPRESS_CONFIG
> +	depends on VEXPRESS_CONFIG=y
>  	help
>  	  Power off and reset support for the ARM Ltd. Versatile
>  	  Express boards.
> -- 
> 2.26.2
> 

This causes a warning for ARCH=arm allmodconfig:

$ make -j"$(nproc)" -s ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- O=out/arm allmodconfig

WARNING: unmet direct dependencies detected for POWER_RESET_VEXPRESS
  Depends on [n]: POWER_RESET [=y] && (ARM [=y] || ARM64) && VEXPRESS_CONFIG [=m]=y
  Selected by [y]:
  - ARCH_VEXPRESS [=y] && ARCH_MULTI_V7 [=y]

and still doesn't fix the error:

arm-linux-gnueabi-ld: drivers/power/reset/vexpress-poweroff.o: in function `vexpress_reset_probe':
vexpress-poweroff.c:(.text+0x36c): undefined reference to `devm_regmap_init_vexpress_config'

Cheers,
Nathan

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

* Re: [PATCH] power: reset: vexpress: fix build issue
  2020-05-24 22:20 ` Nathan Chancellor
@ 2020-05-25 23:37   ` Valdis Klētnieks
  2020-05-26  5:38     ` Nathan Chancellor
  0 siblings, 1 reply; 7+ messages in thread
From: Valdis Klētnieks @ 2020-05-25 23:37 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: Anders Roxell, geert+renesas, magnus.damm, linux-renesas-soc,
	sre, robh, linux-kernel


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

On Sun, 24 May 2020 15:20:25 -0700, Nathan Chancellor said:

> arm-linux-gnueabi-ld: drivers/power/reset/vexpress-poweroff.o: in function `vexpress_reset_probe':
> vexpress-poweroff.c:(.text+0x36c): undefined reference to `devm_regmap_init_vexpress_config'

The part I can't figure out is that git blame tells me there's already an
export:

3b9334ac835bb (Pawel Moll      2014-04-30 16:46:29 +0100 154)   return regmap;
3b9334ac835bb (Pawel Moll      2014-04-30 16:46:29 +0100 155) }
b33cdd283bd91 (Arnd Bergmann   2014-05-26 17:25:22 +0200 156) EXPORT_SYMBOL_GPL(devm_regmap_init_vexpress_config);
3b9334ac835bb (Pawel Moll      2014-04-30 16:46:29 +0100 157)

but I can't figure out where or if drivers/power/reset/vexpress-poweroff.c gets
a MODULE_LICENSE from...

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

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

* Re: [PATCH] power: reset: vexpress: fix build issue
  2020-05-25 23:37   ` Valdis Klētnieks
@ 2020-05-26  5:38     ` Nathan Chancellor
  2020-05-26 15:41       ` Rob Herring
  0 siblings, 1 reply; 7+ messages in thread
From: Nathan Chancellor @ 2020-05-26  5:38 UTC (permalink / raw)
  To: Valdis Klētnieks
  Cc: Anders Roxell, geert+renesas, magnus.damm, linux-renesas-soc,
	sre, robh, linux-kernel

On Mon, May 25, 2020 at 07:37:45PM -0400, Valdis Klētnieks wrote:
> On Sun, 24 May 2020 15:20:25 -0700, Nathan Chancellor said:
> 
> > arm-linux-gnueabi-ld: drivers/power/reset/vexpress-poweroff.o: in function `vexpress_reset_probe':
> > vexpress-poweroff.c:(.text+0x36c): undefined reference to `devm_regmap_init_vexpress_config'
> 
> The part I can't figure out is that git blame tells me there's already an
> export:
> 
> 3b9334ac835bb (Pawel Moll      2014-04-30 16:46:29 +0100 154)   return regmap;
> 3b9334ac835bb (Pawel Moll      2014-04-30 16:46:29 +0100 155) }
> b33cdd283bd91 (Arnd Bergmann   2014-05-26 17:25:22 +0200 156) EXPORT_SYMBOL_GPL(devm_regmap_init_vexpress_config);
> 3b9334ac835bb (Pawel Moll      2014-04-30 16:46:29 +0100 157)
> 
> but I can't figure out where or if drivers/power/reset/vexpress-poweroff.c gets
> a MODULE_LICENSE from...

Correct, it is exported but that file is being built as a module whereas
the file requiring it is beign builtin. As far as I understand, that
will not work, hence the error.

The issue with this patch is that ARCH_VEXPRESS still just selects
POWER_RESET_VEXPRESS, which ignores "depends on", hence the Kconfig
warning and not fixing the error.

I am not that much of a Kconfig guru to come up with a solution. I am
just reporting it because arm allmodconfig is broken on -next due to
this.

Cheers,
Nathan

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

* Re: [PATCH] power: reset: vexpress: fix build issue
  2020-05-26  5:38     ` Nathan Chancellor
@ 2020-05-26 15:41       ` Rob Herring
  2020-05-27  6:28         ` Anders Roxell
  0 siblings, 1 reply; 7+ messages in thread
From: Rob Herring @ 2020-05-26 15:41 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: Valdis Klētnieks, Anders Roxell, Geert Uytterhoeven,
	Magnus Damm, open list:MEDIA DRIVERS FOR RENESAS - FCP,
	Sebastian Reichel, linux-kernel

" On Mon, May 25, 2020 at 11:38 PM Nathan Chancellor
<natechancellor@gmail.com> wrote:
>
> On Mon, May 25, 2020 at 07:37:45PM -0400, Valdis Klētnieks wrote:
> > On Sun, 24 May 2020 15:20:25 -0700, Nathan Chancellor said:
> >
> > > arm-linux-gnueabi-ld: drivers/power/reset/vexpress-poweroff.o: in function `vexpress_reset_probe':
> > > vexpress-poweroff.c:(.text+0x36c): undefined reference to `devm_regmap_init_vexpress_config'
> >
> > The part I can't figure out is that git blame tells me there's already an
> > export:
> >
> > 3b9334ac835bb (Pawel Moll      2014-04-30 16:46:29 +0100 154)   return regmap;
> > 3b9334ac835bb (Pawel Moll      2014-04-30 16:46:29 +0100 155) }
> > b33cdd283bd91 (Arnd Bergmann   2014-05-26 17:25:22 +0200 156) EXPORT_SYMBOL_GPL(devm_regmap_init_vexpress_config);
> > 3b9334ac835bb (Pawel Moll      2014-04-30 16:46:29 +0100 157)
> >
> > but I can't figure out where or if drivers/power/reset/vexpress-poweroff.c gets
> > a MODULE_LICENSE from...
>
> Correct, it is exported but that file is being built as a module whereas
> the file requiring it is beign builtin. As far as I understand, that
> will not work, hence the error.
>
> The issue with this patch is that ARCH_VEXPRESS still just selects
> POWER_RESET_VEXPRESS, which ignores "depends on", hence the Kconfig
> warning and not fixing the error.
>
> I am not that much of a Kconfig guru to come up with a solution. I am
> just reporting it because arm allmodconfig is broken on -next due to
> this.

Commit "ARM: vexpress: Don't select VEXPRESS_CONFIG" needs to be
reverted. I've asked Arnd to revert it.

Anders patch is still needed for arm64.

Rob

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

* Re: [PATCH] power: reset: vexpress: fix build issue
  2020-05-26 15:41       ` Rob Herring
@ 2020-05-27  6:28         ` Anders Roxell
  0 siblings, 0 replies; 7+ messages in thread
From: Anders Roxell @ 2020-05-27  6:28 UTC (permalink / raw)
  To: Rob Herring
  Cc: Nathan Chancellor, Valdis Klētnieks, Geert Uytterhoeven,
	Magnus Damm, open list:MEDIA DRIVERS FOR RENESAS - FCP,
	Sebastian Reichel, linux-kernel

On Tue, 26 May 2020 at 17:41, Rob Herring <robh@kernel.org> wrote:
>
> " On Mon, May 25, 2020 at 11:38 PM Nathan Chancellor
> <natechancellor@gmail.com> wrote:
> >
> > On Mon, May 25, 2020 at 07:37:45PM -0400, Valdis Klētnieks wrote:
> > > On Sun, 24 May 2020 15:20:25 -0700, Nathan Chancellor said:
> > >
> > > > arm-linux-gnueabi-ld: drivers/power/reset/vexpress-poweroff.o: in function `vexpress_reset_probe':
> > > > vexpress-poweroff.c:(.text+0x36c): undefined reference to `devm_regmap_init_vexpress_config'
> > >
> > > The part I can't figure out is that git blame tells me there's already an
> > > export:
> > >
> > > 3b9334ac835bb (Pawel Moll      2014-04-30 16:46:29 +0100 154)   return regmap;
> > > 3b9334ac835bb (Pawel Moll      2014-04-30 16:46:29 +0100 155) }
> > > b33cdd283bd91 (Arnd Bergmann   2014-05-26 17:25:22 +0200 156) EXPORT_SYMBOL_GPL(devm_regmap_init_vexpress_config);
> > > 3b9334ac835bb (Pawel Moll      2014-04-30 16:46:29 +0100 157)
> > >
> > > but I can't figure out where or if drivers/power/reset/vexpress-poweroff.c gets
> > > a MODULE_LICENSE from...
> >
> > Correct, it is exported but that file is being built as a module whereas
> > the file requiring it is beign builtin. As far as I understand, that
> > will not work, hence the error.
> >
> > The issue with this patch is that ARCH_VEXPRESS still just selects
> > POWER_RESET_VEXPRESS, which ignores "depends on", hence the Kconfig
> > warning and not fixing the error.
> >
> > I am not that much of a Kconfig guru to come up with a solution. I am
> > just reporting it because arm allmodconfig is broken on -next due to
> > this.
>
> Commit "ARM: vexpress: Don't select VEXPRESS_CONFIG" needs to be
> reverted. I've asked Arnd to revert it.

Reverting that patch with my patch will make allmodconfig work for arm too.

>
> Anders patch is still needed for arm64.

Yes, it is still needed for arm64.

Cheers,
Anders

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

end of thread, back to index

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-22 22:01 [PATCH] power: reset: vexpress: fix build issue Anders Roxell
2020-05-22 22:52 ` Rob Herring
2020-05-24 22:20 ` Nathan Chancellor
2020-05-25 23:37   ` Valdis Klētnieks
2020-05-26  5:38     ` Nathan Chancellor
2020-05-26 15:41       ` Rob Herring
2020-05-27  6:28         ` Anders Roxell

Linux-Renesas-SoC Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-renesas-soc/0 linux-renesas-soc/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-renesas-soc linux-renesas-soc/ https://lore.kernel.org/linux-renesas-soc \
		linux-renesas-soc@vger.kernel.org
	public-inbox-index linux-renesas-soc

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-renesas-soc


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git