power: reset: vexpress: fix build issue
PATCH 1/1 power: reset: vexpress: fix build issue
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'.
--- drivers/power/reset/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/reset/Kconfig +1 -1
@@ -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.
Signature · 1 line
2.26.2
Quoted 1 line · Anders Roxell
It's [email protected] that this needs to go to with an explicit request for them to apply. Please resend so it gets in their Patchwork.
Quoted 35 lines
An allmodconfig kernel makes
CONFIG_VEXPRESS_CONFIGa module andCONFIG_POWER_RESET_VEXPRESSbuiltin. 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 todevm_regmap_init_vexpress_config' ../drivers/power/reset/vexpress-poweroff.c:119:(.text+0x48c): relocation truncated to fit: R_AARCH64_CALL26 against undefined symboldevm_regmap_init_vexpress_config'
make[1]: *** [/srv/src/kernel/next/Makefile:1126: vmlinux] Error 1Rework so that
POWER_RESET_VEXPRESSdepends on 'VEXPRESS_CONFIG=y'.Fixes d06cfe3f123c ("bus: vexpress-config: Merge vexpress-syscfg into vexpress-config")Acked-by Rob Herring <[email protected]>Signed-off-by Anders Roxell <[email protected]>--- drivers/power/reset/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/power/reset/Kconfig +1
-2@@ -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
Quoted 35 lines · Anders Roxell
An allmodconfig kernel makes
CONFIG_VEXPRESS_CONFIGa module andCONFIG_POWER_RESET_VEXPRESSbuiltin. 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 todevm_regmap_init_vexpress_config' ../drivers/power/reset/vexpress-poweroff.c:119:(.text+0x48c): relocation truncated to fit: R_AARCH64_CALL26 against undefined symboldevm_regmap_init_vexpress_config'
make[1]: *** [/srv/src/kernel/next/Makefile:1126: vmlinux] Error 1Rework so that
POWER_RESET_VEXPRESSdepends on 'VEXPRESS_CONFIG=y'.Fixes d06cfe3f123c ("bus: vexpress-config: Merge vexpress-syscfg into vexpress-config")Acked-by Rob Herring <[email protected]>Signed-off-by Anders Roxell <[email protected]>--- drivers/power/reset/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/power/reset/Kconfig +1
-1@@ -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.Signature · 1 line
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
Quoted 2 lines · Nathan Chancellor
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...
Quoted 8 lines · Valdis Klētnieks
Quoted 2 lines · Nathan Chancellor
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:
Quoted 7 lines
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.cgets aMODULE_LICENSEfrom...
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
" On Mon, May 25, 2020 at 11:38 PM Nathan Chancellor
Quoted 22 lines · <[email protected]> wrote:
Quoted 8 lines · Valdis Klētnieks
Quoted 2 lines · Nathan Chancellor
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:
Quoted 7 lines
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.cgets aMODULE_LICENSEfrom...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.
Quoted 7 lines
The issue with this patch is that
ARCH_VEXPRESSstill just selectsPOWER_RESET_VEXPRESS, which ignores "depends on", hence theKconfigwarning and not fixing the error.I am not that much of a
Kconfigguru 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
Quoted 29 lines · Rob Herring
" On Mon, May 25, 2020 at 11:38 PM Nathan Chancellor
Quoted 26 lines · <[email protected]> wrote:
Quoted 8 lines · Valdis Klētnieks
Quoted 2 lines · Nathan Chancellor
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:
Quoted 7 lines
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.cgets aMODULE_LICENSEfrom...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_VEXPRESSstill just selectsPOWER_RESET_VEXPRESS, which ignores "depends on", hence theKconfigwarning and not fixing the error.
Quoted 6 lines
Quoted 3 lines
I am not that much of a
Kconfigguru 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.
Quoted 2 lines
Anders patch is still needed for arm64.
Yes, it is still needed for arm64.
Cheers,
Anders