linux-next: build failure after merge of the pmdomain tree
Subsystems (4)
Hi all,
After merging the pmdomain tree, today's linux-next build (x86_64 allmodconfig) failed like this:
x86_64-linux-gnu-ld: vmlinux.o: in function `rockchip_do_pmu_set_power_domain':
pm-domains.c:(.text+0x19aa103): undefined reference to `arm_smccc_1_1_get_conduit'
Caused by commit
61eeb9678789 ("pmdomain: rockchip: Check if SMC could be handled by TA")
$ grep CONFIG_HAVE_ARM_SMCCC_DISCOVERY .config $
I have used the pmdomain tree from next-20250219 for today.
Signature · 2 lines
Cheers, Stephen Rothwell
Quoted 5 lines · Stephen Rothwell
Hi all,
After merging the pmdomain tree, today's linux-next build (
x86_64allmodconfig) failed like this:
Quoted 8 lines
x86_64-linux-gnu-ld: vmlinux.o: in function `rockchip_do_pmu_set_power_domain':
pm-domains.c:(.text+0x19aa103): undefined reference to `arm_smccc_1_1_get_conduit'Caused by commit
61eeb9678789("pmdomain: rockchip: Check if SMC could be handled by TA")$ grep CONFIG_HAVE_ARM_SMCCC_DISCOVERY .config
It seems x86_64_defconfig did't enable CONFIG_HAVE_ARM_SMCCC_DISCOVERY which apparently belongs to ARM stuff.
Selecting HAVE_ARM_SMCCC_DISCOVERY and ARM_PSCI_FW should pass the x86_64 allmodconfig compile.
drivers/pmdomain/rockchip/Kconfig +2 -0
@@ -5,6 +5,8 @@ config ROCKCHIP_PM_DOMAINS bool "Rockchip generic power domain" depends on PM select PM_GENERIC_DOMAINS + select ARM_PSCI_FW + select HAVE_ARM_SMCCC_DISCOVERY help Say y here to enable power domain support. In order to meet high performance and low power requirements,
a power
Quoted 4 lines
$
I have used the pmdomain tree from next-20250219 for today.
Hi all,
Quoted 7 lines · On Thu, 20 Feb 2025 11:33:38 +1100 Stephen Rothwell <[email protected]>…
After merging the pmdomain tree, today's linux-next build (
x86_64allmodconfig) failed like this:x86_64-linux-gnu-ld: vmlinux.o: in function `rockchip_do_pmu_set_power_domain':
pm-domains.c:(.text+0x19aa103): undefined reference to `arm_smccc_1_1_get_conduit'
Quoted 8 lines
Caused by commit
61eeb9678789("pmdomain: rockchip: Check if SMC could be handled by TA")$ grep CONFIG_HAVE_ARM_SMCCC_DISCOVERY .config $I have used the pmdomain tree from next-20250219 for today.
I am still seeing this build failure.
Signature · 2 lines
Cheers, Stephen Rothwell
Hi all,
Quoted 11 lines · On Mon, 24 Feb 2025 12:23:18 +1100 Stephen Rothwell <[email protected]>…
Quoted 9 lines · On Thu, 20 Feb 2025 11:33:38 +1100 Stephen Rothwell <[email protected]>…
After merging the pmdomain tree, today's linux-next build (
x86_64allmodconfig) failed like this:x86_64-linux-gnu-ld: vmlinux.o: in function `rockchip_do_pmu_set_power_domain':
pm-domains.c:(.text+0x19aa103): undefined reference to `arm_smccc_1_1_get_conduit'Caused by commit
Quoted 8 lines
Quoted 6 lines
61eeb9678789("pmdomain: rockchip: Check if SMC could be handled by TA")$ grep CONFIG_HAVE_ARM_SMCCC_DISCOVERY .config $I have used the pmdomain tree from next-20250219 for today.
I am still seeing this build failure.
And now that commit from the pmdomain tree has been merged into the scsi-mkp tree and so the build failure happens there as well.
I have used the scsi-mkp tree from next-20250221 for today.
Signature · 2 lines
Cheers, Stephen Rothwell
Quoted 24 lines · Stephen Rothwell
Hi all,
Quoted 11 lines · On Mon, 24 Feb 2025 12:23:18 +1100 Stephen Rothwell <[email protected]>…
Quoted 9 lines · On Thu, 20 Feb 2025 11:33:38 +1100 Stephen Rothwell <[email protected]>…
After merging the pmdomain tree, today's linux-next build (
x86_64allmodconfig) failed like this:x86_64-linux-gnu-ld: vmlinux.o: in function `rockchip_do_pmu_set_power_domain':
pm-domains.c:(.text+0x19aa103): undefined reference to `arm_smccc_1_1_get_conduit'Caused by commit
Quoted 8 lines
Quoted 6 lines
61eeb9678789("pmdomain: rockchip: Check if SMC could be handled by TA")$ grep CONFIG_HAVE_ARM_SMCCC_DISCOVERY .config $I have used the pmdomain tree from next-20250219 for today.
I am still seeing this build failure.
Quoted 8 lines
And now that commit from the pmdomain tree has been merged into the scsi-mkp tree and so the build failure happens there as well.
I have used the scsi-mkp tree from next-20250221 for today.
--
Cheers,
Stephen Rothwell
Stephen, thanks for reporting and sorry for the delay.
I have now fixed the problem on the next branch as well on the immutable rockchip branch. Martin, please pull again.
Sorry for the mess!
Shawn-Lin, no need for any action from your side, I have taken care of the issue.
Kind regards
Uffe
Quoted 3 lines
I have now fixed the problem on the next branch as well on the immutable rockchip branch. Martin, please pull again.
OK. I have updated my scsi-staging.
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering
Hi Ulf,
Quoted 25 lines · Ulf Hansson
Quoted 24 lines · Stephen Rothwell
Quoted 9 lines · On Mon, 24 Feb 2025 12:23:18 +1100 Stephen Rothwell <[email protected]>…
Quoted 8 lines · On Thu, 20 Feb 2025 11:33:38 +1100 Stephen Rothwell <[email protected]>…
After merging the pmdomain tree, today's linux-next build (
x86_64allmodconfig) failed like this:x86_64-linux-gnu-ld: vmlinux.o: in function `rockchip_do_pmu_set_power_domain':
pm-domains.c:(.text+0x19aa103): undefined reference to `arm_smccc_1_1_get_conduit'Caused by commit
Quoted 8 lines
Quoted 6 lines
61eeb9678789("pmdomain: rockchip: Check if SMC could be handled by TA")$ grep CONFIG_HAVE_ARM_SMCCC_DISCOVERY .config $I have used the pmdomain tree from next-20250219 for today.
I am still seeing this build failure.
And now that commit from the pmdomain tree has been merged into the scsi-mkp tree and so the build failure happens there as well.
I have used the scsi-mkp tree from next-20250221 for today.
Quoted 8 lines
Quoted 3 lines
--
Cheers,
Stephen RothwellStephen, thanks for reporting and sorry for the delay.
I have now fixed the problem on the next branch as well on the immutable rockchip branch. Martin, please pull again.
So this was fixed by adding a dependency on HAVE_ARM_SMCCC_DISCOVERY[1].
I am no Rockchip expert, but is this the correct fix?
As arch/arm/boot/dts/rockchip/rk3036.dtsi uses enable-method = "rockchip,rk3036-smp", e.g. RK3036 does not depend on PSCI, so I assume you could run a kernel without PSCI support on RK3036 before?
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Heiko Stübner
maintainerHi Geert,
Am Donnerstag, 27. Februar 2025, 16:56:01 MEZ schrieb Geert Uytterhoeven:
Quoted 37 lines
Hi Ulf,
Quoted 25 lines · Ulf Hansson
Quoted 24 lines · Stephen Rothwell
Quoted 9 lines · On Mon, 24 Feb 2025 12:23:18 +1100 Stephen Rothwell <[email protected]>…
Quoted 8 lines · On Thu, 20 Feb 2025 11:33:38 +1100 Stephen Rothwell <[email protected]>…
After merging the pmdomain tree, today's linux-next build (
x86_64allmodconfig) failed like this:x86_64-linux-gnu-ld: vmlinux.o: in function `rockchip_do_pmu_set_power_domain':
pm-domains.c:(.text+0x19aa103): undefined reference to `arm_smccc_1_1_get_conduit'Caused by commit
Quoted 8 lines
Quoted 6 lines
61eeb9678789("pmdomain: rockchip: Check if SMC could be handled by TA")$ grep CONFIG_HAVE_ARM_SMCCC_DISCOVERY .config $I have used the pmdomain tree from next-20250219 for today.
I am still seeing this build failure.
And now that commit from the pmdomain tree has been merged into the scsi-mkp tree and so the build failure happens there as well.
I have used the scsi-mkp tree from next-20250221 for today.
Quoted 8 lines
Quoted 3 lines
--
Cheers,
Stephen RothwellStephen, thanks for reporting and sorry for the delay.
I have now fixed the problem on the next branch as well on the immutable rockchip branch. Martin, please pull again.
Quoted 6 lines
So this was fixed by adding a dependency on HAVE_ARM_SMCCC_DISCOVERY[1].
I am no Rockchip expert, but is this the correct fix?
Asarch/arm/boot/dts/rockchip/rk3036.dtsiuses enable-method = "rockchip,rk3036-smp", e.g. RK3036 does not depend on PSCI, so I assume you could run a kernel without PSCI support on RK3036 before?
All still relevant 32bit Rockchip SoCs (rv11*) already switched over to PSCI. So if one uses some sort of distro-kernel (or one simply built from the in-kernel defconfig), PSCI support will be in there already.
So the only case where this is relevant, is for kernels custom-build for one specific soc type.
The rk3036 (and rk3128) are from the same era as the rk3288 - 2014 . That's more than 10 years ago. And we're not talking about these old boards not working anymore - just a _possible_ size increase in very special cases (of not using any distro-like kernel).
arm32 psci.o is 176kb ... and even my r3036-kylin board came with 512MB ram. So personally I'm not too worried.
Heiko
Hi Heiko,
Quoted 38 lines · Heiko Stübner
Am Donnerstag, 27. Februar 2025, 16:56:01 MEZ schrieb Geert Uytterhoeven:
Quoted 37 lines · Ulf Hansson
Quoted 25 lines · Stephen Rothwell
Quoted 24 lines · On Mon, 24 Feb 2025 12:23:18 +1100 Stephen Rothwell <[email protected]>…
Quoted 9 lines · On Thu, 20 Feb 2025 11:33:38 +1100 Stephen Rothwell <[email protected]>…
Quoted 8 lines
After merging the pmdomain tree, today's linux-next build (
x86_64allmodconfig) failed like this:x86_64-linux-gnu-ld: vmlinux.o: in function `rockchip_do_pmu_set_power_domain':
pm-domains.c:(.text+0x19aa103): undefined reference to `arm_smccc_1_1_get_conduit'Caused by commit
Quoted 8 lines
Quoted 6 lines
61eeb9678789("pmdomain: rockchip: Check if SMC could be handled by TA")$ grep CONFIG_HAVE_ARM_SMCCC_DISCOVERY .config $I have used the pmdomain tree from next-20250219 for today.
I am still seeing this build failure.
And now that commit from the pmdomain tree has been merged into the scsi-mkp tree and so the build failure happens there as well.
I have used the scsi-mkp tree from next-20250221 for today.
Quoted 8 lines
Quoted 3 lines
--
Cheers,
Stephen RothwellStephen, thanks for reporting and sorry for the delay.
I have now fixed the problem on the next branch as well on the immutable rockchip branch. Martin, please pull again.
So this was fixed by adding a dependency on HAVE_ARM_SMCCC_DISCOVERY[1].
Quoted 8 lines
Quoted 4 lines
I am no Rockchip expert, but is this the correct fix?
Asarch/arm/boot/dts/rockchip/rk3036.dtsiuses enable-method = "rockchip,rk3036-smp", e.g. RK3036 does not depend on PSCI, so I assume you could run a kernel without PSCI support on RK3036 before?All still relevant 32bit Rockchip SoCs (rv11*) already switched over to PSCI. So if one uses some sort of distro-kernel (or one simply built from the in-kernel defconfig), PSCI support will be in there already.
OK.
Quoted 10 lines
So the only case where this is relevant, is for kernels custom-build for one specific soc type.
The rk3036 (and rk3128) are from the same era as the rk3288 - 2014 . That's more than 10 years ago. And we're not talking about these old boards not working anymore - just a _possible_ size increase in very special cases (of not using any distro-like kernel).
arm32 psci.o is 176kb ... and even my r3036-kylin board came with 512MB ram. So personally I'm not too worried.
My worry is not so much about the size increase, but about CONFIG_ROCKCHIP_PM_DOMAINS becoming disabled when running "make oldconfig" if CONFIG_PSCI is disabled.
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Heiko Stübner
maintainerAm Donnerstag, 27. Februar 2025, 18:05:18 MEZ schrieb Geert Uytterhoeven:
Quoted 24 lines · Heiko Stübner
Quoted 4 lines
Am Donnerstag, 27. Februar 2025, 16:56:01 MEZ schrieb Geert Uytterhoeven:
Quoted 3 lines · Ulf Hansson
So this was fixed by adding a dependency on HAVE_ARM_SMCCC_DISCOVERY[1].
Quoted 8 lines
Quoted 4 lines
I am no Rockchip expert, but is this the correct fix?
Asarch/arm/boot/dts/rockchip/rk3036.dtsiuses enable-method = "rockchip,rk3036-smp", e.g. RK3036 does not depend on PSCI, so I assume you could run a kernel without PSCI support on RK3036 before?All still relevant 32bit Rockchip SoCs (rv11*) already switched over to PSCI. So if one uses some sort of distro-kernel (or one simply built from the in-kernel defconfig), PSCI support will be in there already.
OK.
Quoted 8 lines
So the only case where this is relevant, is for kernels custom-build for one specific soc type.
The rk3036 (and rk3128) are from the same era as the rk3288 - 2014 . That's more than 10 years ago. And we're not talking about these old boards not working anymore - just a _possible_ size increase in very special cases (of not using any distro-like kernel).
Quoted 6 lines
Quoted 2 lines
arm32 psci.o is 176kb ... and even my r3036-kylin board came with 512MB ram. So personally I'm not too worried.
My worry is not so much about the size increase, but about
CONFIG_ROCKCHIP_PM_DOMAINSbecoming disabled when running "make oldconfig" ifCONFIG_PSCIis disabled.
ah, now I get it :-)
I guess there are ways to prevent this (still uncommon) case:
(1) The CONFIG_ARM_GIC_V3 already uses a
select HAVE_ARM_SMCCC_DISCOVERY
The pm-domain could do that as well.
(2) The main __arm_smccc_smc has a stub for the !CONFIG_HAVE_ARM_SMCCC case, and arm_smccc_1_1_get_conduit() is described as
"When SMCCCv1.1 is not present, returns SMCCC_CONDUIT_NONE."
------
include/linux/arm-smccc.h +7 -0
@@ -300,7 +300,14 @@ enum arm_smccc_conduit {* * When SMCCCv1.1 is not present, returns SMCCC_CONDUIT_NONE. */ +#ifdef CONFIG_HAVE_ARM_SMCCC_DISCOVERY enum arm_smccc_conduit arm_smccc_1_1_get_conduit (void ); +#else +static inline enum arm_smccc_conduit arm_smccc_1_1_get_conduit (void ) +{ +return SMCCC_CONDUIT_NONE ; +} +#endif /** * arm_smccc_get_version()
----
I guess case (1) might be the easier one, because stubbing out only one smccc function might raise the issue of what about the others.
Hi Heiko,
Quoted 66 lines · Heiko Stübner
Am Donnerstag, 27. Februar 2025, 18:05:18 MEZ schrieb Geert Uytterhoeven:
Quoted 24 lines · Heiko Stübner
Quoted 4 lines
Am Donnerstag, 27. Februar 2025, 16:56:01 MEZ schrieb Geert Uytterhoeven:
Quoted 3 lines · Ulf Hansson
So this was fixed by adding a dependency on HAVE_ARM_SMCCC_DISCOVERY[1].
Quoted 8 lines
Quoted 4 lines
I am no Rockchip expert, but is this the correct fix?
Asarch/arm/boot/dts/rockchip/rk3036.dtsiuses enable-method = "rockchip,rk3036-smp", e.g. RK3036 does not depend on PSCI, so I assume you could run a kernel without PSCI support on RK3036 before?All still relevant 32bit Rockchip SoCs (rv11*) already switched over to PSCI. So if one uses some sort of distro-kernel (or one simply built from the in-kernel defconfig), PSCI support will be in there already.
OK.
Quoted 8 lines
So the only case where this is relevant, is for kernels custom-build for one specific soc type.
The rk3036 (and rk3128) are from the same era as the rk3288 - 2014 . That's more than 10 years ago. And we're not talking about these old boards not working anymore - just a _possible_ size increase in very special cases (of not using any distro-like kernel).
Quoted 6 lines
Quoted 2 lines
arm32 psci.o is 176kb ... and even my r3036-kylin board came with 512MB ram. So personally I'm not too worried.
My worry is not so much about the size increase, but about
CONFIG_ROCKCHIP_PM_DOMAINSbecoming disabled when running "make oldconfig" ifCONFIG_PSCIis disabled.ah, now I get it :-)
I guess there are ways to prevent this (still uncommon) case:
(1) The
CONFIG_ARM_GIC_V3already uses a
selectHAVE_ARM_SMCCC_DISCOVERY
The pm-domain could do that as well.(2) The main
__arm_smccc_smchas a stub for the !CONFIG_HAVE_ARM_SMCCC case, andarm_smccc_1_1_get_conduit()is described as
"When SMCCCv1.1 is not present, returnsSMCCC_CONDUIT_NONE."------
include/linux/arm-smccc.h +7
-1@@ -300,7 +300,14 @@ enum arm_smccc_conduit {* * When SMCCCv1.1 is not present, returns SMCCC_CONDUIT_NONE. */ +#ifdef CONFIG_HAVE_ARM_SMCCC_DISCOVERY enum arm_smccc_conduit arm_smccc_1_1_get_conduit (void ); +#else +static inline enum arm_smccc_conduit arm_smccc_1_1_get_conduit (void ) +{ +return SMCCC_CONDUIT_NONE ; +} +#endif /** * arm_smccc_get_version() ----
Quoted 2 lines
I guess case (1) might be the easier one, because stubbing out only one smccc function might raise the issue of what about the others.
Or protect the callsite in rockchip_do_pmu_set_power_domain() by #ifdef CONFIG_ARM_PSCI?
Note that arch/arm/mm/proc-v7-bugs.c seems to call arm_smccc_1_1_get_conduit() unconditionally, but the code is optimized away due to spectre_v2_get_cpu_fw_mitigation_state() having a dummy for the !CONFIG_ARM_PSCI case...
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Quoted 33 lines · Heiko Stübner
Am Donnerstag, 27. Februar 2025, 18:05:18 MEZ schrieb Geert Uytterhoeven:
Quoted 24 lines · Heiko Stübner
Quoted 4 lines
Am Donnerstag, 27. Februar 2025, 16:56:01 MEZ schrieb Geert Uytterhoeven:
Quoted 3 lines · Ulf Hansson
So this was fixed by adding a dependency on HAVE_ARM_SMCCC_DISCOVERY[1].
Quoted 8 lines
Quoted 4 lines
I am no Rockchip expert, but is this the correct fix?
Asarch/arm/boot/dts/rockchip/rk3036.dtsiuses enable-method = "rockchip,rk3036-smp", e.g. RK3036 does not depend on PSCI, so I assume you could run a kernel without PSCI support on RK3036 before?All still relevant 32bit Rockchip SoCs (rv11*) already switched over to PSCI. So if one uses some sort of distro-kernel (or one simply built from the in-kernel defconfig), PSCI support will be in there already.
OK.
Quoted 8 lines
So the only case where this is relevant, is for kernels custom-build for one specific soc type.
The rk3036 (and rk3128) are from the same era as the rk3288 - 2014 . That's more than 10 years ago. And we're not talking about these old boards not working anymore - just a _possible_ size increase in very special cases (of not using any distro-like kernel).
Quoted 6 lines
Quoted 2 lines
arm32 psci.o is 176kb ... and even my r3036-kylin board came with 512MB ram. So personally I'm not too worried.
My worry is not so much about the size increase, but about
CONFIG_ROCKCHIP_PM_DOMAINSbecoming disabled when running "make oldconfig" ifCONFIG_PSCIis disabled.
Quoted 8 lines
ah, now I get it :-)
I guess there are ways to prevent this (still uncommon) case:
(1) The
CONFIG_ARM_GIC_V3already uses a
selectHAVE_ARM_SMCCC_DISCOVERY
The pm-domain could do that as well.
I think the select better belongs in the soc specific Kconfig.
Like in arch/arm/mach-rockchip/Kconfig, for example.
Quoted 12 lines
(2) The main
__arm_smccc_smchas a stub for the !CONFIG_HAVE_ARM_SMCCC case, andarm_smccc_1_1_get_conduit()is described as
"When SMCCCv1.1 is not present, returnsSMCCC_CONDUIT_NONE."------
include/linux/arm-smccc.h +0
-0@@ -300,7 +300,14 @@ enum arm_smccc_conduit {*
include/linux/arm-smccc.h enum arm_smccc_conduit { · line 310
Quoted 10 lines
include/linux/arm-smccc.h +7
-0* When SMCCCv1.1 is not present, returns SMCCC_CONDUIT_NONE. */ +#ifdef CONFIG_HAVE_ARM_SMCCC_DISCOVERY enum arm_smccc_conduit arm_smccc_1_1_get_conduit (void ); +#else +static inline enum arm_smccc_conduit arm_smccc_1_1_get_conduit (void ) +{ +return SMCCC_CONDUIT_NONE ; +} +#endif
This could make sense, but to me this is an orthogonal problem.
In the end, we really need the "select" to be done so the platform becomes configured correctly.
Kind regards
Uffe