* [PATCH] firmware: qcom: scm: Hide QCOM_SCM instead of depending on ARCH_QCOM
@ 2026-09-13 17:30 Sasha Levin
2026-09-14 7:36 ` Geert Uytterhoeven
0 siblings, 1 reply; 2+ messages in thread
From: Sasha Levin @ 2026-09-13 17:30 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Sumit Garg, Geert Uytterhoeven
Cc: Sasha Levin, kernel test robot, Abel Vesa, Konrad Dybcio,
linux-arm-msm, linux-kernel
imx_v6_v7_defconfig fails to link:
arm-linux-gnueabihf-ld: drivers/firmware/qcom/qcom_scm.o: in function
`qcom_scm_pas_init_image':
qcom_scm.c:(.text+0xecc): undefined reference to `qcom_tzmem_alloc'
qcom_scm.c:(.text+0x2b0): undefined reference to `qcom_tzmem_free'
qcom_scm.c:(.text+0x1514): undefined reference to `qcom_tzmem_to_phys'
QCOM_SCM gained a "depends on ARCH_QCOM || COMPILE_TEST", but it is
selected from 20 places in the tree and several of those are reachable
without ARCH_QCOM. DRM_MSM is one of them, via SOC_IMX5, which is how
imx_v6_v7_defconfig ends up here:
WARNING: unmet direct dependencies detected for QCOM_SCM
Depends on [n]: ARCH_QCOM [=n] || COMPILE_TEST [=n]
Selected by [y]:
- DRM_MSM [=y] && ... && (ARCH_QCOM [=n] || SOC_IMX5 [=y] ||
COMPILE_TEST [=n]) && ...
kconfig still honours the select and sets QCOM_SCM=y, but it does not
propagate the selects of a symbol whose own dependencies are unmet, so
QCOM_TZMEM is left unset, qcom_tzmem.c is not built, and the
unconditional qcom_tzmem_*() calls in qcom_scm.c and qcom_scm-smc.c
have nothing to bind to.
The point of the dependency was only to stop asking the user about
Qualcomm firmware interfaces when configuring a non-Qualcomm kernel.
Express that as a prompt condition, which is what the same commit
already did for QCOM_PAS: the symbol stays invisible, but it no longer
carries a dependency that silently drops its selects.
Found by KernelCI builds of the linus-next tree.
Fixes: 8fecd3194de3 ("firmware: QCOM interfaces should depend on ARCH_QCOM")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202609120634.g0HMAp3g-lkp@intel.com/
Assisted-by: LLM
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/firmware/qcom/Kconfig | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/firmware/qcom/Kconfig b/drivers/firmware/qcom/Kconfig
index 691db0ded8e8c..b50e1309ced5f 100644
--- a/drivers/firmware/qcom/Kconfig
+++ b/drivers/firmware/qcom/Kconfig
@@ -26,8 +26,7 @@ config QCOM_PAS_TEE
by the firmware TEE implementation as the backend.
config QCOM_SCM
- tristate "Qualcomm PAS SCM interface driver"
- depends on ARCH_QCOM || COMPILE_TEST
+ tristate "Qualcomm PAS SCM interface driver" if ARCH_QCOM || COMPILE_TEST
select QCOM_PAS
select QCOM_TZMEM
default y if ARCH_QCOM
--
2.53.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] firmware: qcom: scm: Hide QCOM_SCM instead of depending on ARCH_QCOM
2026-09-13 17:30 [PATCH] firmware: qcom: scm: Hide QCOM_SCM instead of depending on ARCH_QCOM Sasha Levin
@ 2026-09-14 7:36 ` Geert Uytterhoeven
0 siblings, 0 replies; 2+ messages in thread
From: Geert Uytterhoeven @ 2026-09-14 7:36 UTC (permalink / raw)
To: Sasha Levin
Cc: Bjorn Andersson, Konrad Dybcio, Sumit Garg, kernel test robot,
Abel Vesa, Konrad Dybcio, linux-arm-msm, linux-kernel
Hi Sasha,
On Sun, 13 Sept 2026 at 19:30, Sasha Levin <sashal@kernel.org> wrote:
> imx_v6_v7_defconfig fails to link:
>
> arm-linux-gnueabihf-ld: drivers/firmware/qcom/qcom_scm.o: in function
> `qcom_scm_pas_init_image':
> qcom_scm.c:(.text+0xecc): undefined reference to `qcom_tzmem_alloc'
> qcom_scm.c:(.text+0x2b0): undefined reference to `qcom_tzmem_free'
> qcom_scm.c:(.text+0x1514): undefined reference to `qcom_tzmem_to_phys'
>
> QCOM_SCM gained a "depends on ARCH_QCOM || COMPILE_TEST", but it is
> selected from 20 places in the tree and several of those are reachable
> without ARCH_QCOM. DRM_MSM is one of them, via SOC_IMX5, which is how
> imx_v6_v7_defconfig ends up here:
>
> WARNING: unmet direct dependencies detected for QCOM_SCM
> Depends on [n]: ARCH_QCOM [=n] || COMPILE_TEST [=n]
> Selected by [y]:
> - DRM_MSM [=y] && ... && (ARCH_QCOM [=n] || SOC_IMX5 [=y] ||
> COMPILE_TEST [=n]) && ...
>
> kconfig still honours the select and sets QCOM_SCM=y, but it does not
> propagate the selects of a symbol whose own dependencies are unmet, so
> QCOM_TZMEM is left unset, qcom_tzmem.c is not built, and the
> unconditional qcom_tzmem_*() calls in qcom_scm.c and qcom_scm-smc.c
> have nothing to bind to.
>
> The point of the dependency was only to stop asking the user about
> Qualcomm firmware interfaces when configuring a non-Qualcomm kernel.
> Express that as a prompt condition, which is what the same commit
> already did for QCOM_PAS: the symbol stays invisible, but it no longer
> carries a dependency that silently drops its selects.
>
> Found by KernelCI builds of the linus-next tree.
linux-next
>
> Fixes: 8fecd3194de3 ("firmware: QCOM interfaces should depend on ARCH_QCOM")
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202609120634.g0HMAp3g-lkp@intel.com/
> Assisted-by: LLM
> Signed-off-by: Sasha Levin <sashal@kernel.org>
Thanks for your patch!
> --- a/drivers/firmware/qcom/Kconfig
> +++ b/drivers/firmware/qcom/Kconfig
> @@ -26,8 +26,7 @@ config QCOM_PAS_TEE
> by the firmware TEE implementation as the backend.
>
> config QCOM_SCM
> - tristate "Qualcomm PAS SCM interface driver"
> - depends on ARCH_QCOM || COMPILE_TEST
> + tristate "Qualcomm PAS SCM interface driver" if ARCH_QCOM || COMPILE_TEST
> select QCOM_PAS
> select QCOM_TZMEM
> default y if ARCH_QCOM
LGTM for now, so
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
As the MSM driver is used on non-QCOM platforms, too, in the long run,
the "select QCOM_SCM" and "select QCOM_PAS" for DRM_MSM should probably
gain dependencies on ARCH_QCOM (like "select QCOM_UBWC_CONFIG if
ARCH_QCOM" already has), and the various qcom_*() should gain dummies.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-14 7:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-13 17:30 [PATCH] firmware: qcom: scm: Hide QCOM_SCM instead of depending on ARCH_QCOM Sasha Levin
2026-09-14 7:36 ` Geert Uytterhoeven
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®