Skip to contentSkip to conversation

cpuidle: ARM_QCOM_SPM_CPUIDLE should depend on HAVE_ARM_SMCCC

PATCH In review Randy Dunlap 3 participants 3 messages Jun 6, 2021 – Jun 7, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cpuidle: ARM_QCOM_SPM_CPUIDLE should depend on HAVE_ARM_SMCCC

QCOM_SCM depends on HAVE_ARM_SMCCC, so ARM_QCOM_SPM_CPUIDLE should also depend on HAVE_ARM_SMCCC since 'select' does not follow any dependency chains.

This fixes a kconfig warning and subsequent build errors:

WARNING: unmet direct dependencies detected for QCOM_SCM
Depends on [n]: (ARM [=y] || ARM64) && HAVE_ARM_SMCCC [=n]
Selected by [y]:
- ARM_QCOM_SPM_CPUIDLE [=y] && CPU_IDLE [=y] && (ARM [=y] || ARM64) && (ARCH_QCOM [=n] || COMPILE_TEST [=y]) && !ARM64 && MMU [=y]

arm-linux-gnueabi-ld: drivers/firmware/qcom_scm-smc.o: in function `__scm_smc_do_quirk':
qcom_scm-smc.c:(.text+0x5c): undefined reference to `__arm_smccc_smc'
arm-linux-gnueabi-ld: drivers/firmware/qcom_scm-legacy.o: in function `scm_legacy_call':
qcom_scm-legacy.c:(.text+0x140): undefined reference to `__arm_smccc_smc'
arm-linux-gnueabi-ld: drivers/firmware/qcom_scm-legacy.o: in function `scm_legacy_call_atomic':
qcom_scm-legacy.c:(.text+0x364): undefined reference to `__arm_smccc_smc'

Fixes a871be6b8eee ("cpuidle: Convert Qualcomm SPM driver to a generic CPUidle driver")
Cc Stephan Gerhold <[email protected]>
Cc Rafael J. Wysocki <[email protected]>
Cc Andy Gross <[email protected]>
Cc Bjorn Andersson <[email protected]>
Cc He Ying <[email protected]>
---
 drivers/cpuidle/Kconfig.arm |    1 +
 1 file changed, 1 insertion(+)
drivers/cpuidle/Kconfig.arm +1 -0
@@ -108,6 +108,7 @@ config ARM_TEGRA_CPUIDLE
 config ARM_QCOM_SPM_CPUIDLE
 	bool "CPU Idle Driver for Qualcomm Subsystem Power Manager (SPM)"
 	depends on (ARCH_QCOM || COMPILE_TEST) && !ARM64 && MMU
+	depends on HAVE_ARM_SMCCC
 	select ARM_CPU_SUSPEND
 	select CPU_IDLE_MULTIPLE_DRIVERS
 	select DT_IDLE_STATES
#1 lore raw

Hi!

Quoted 18 lines · Randy Dunlap

QCOM_SCM depends on HAVE_ARM_SMCCC, so ARM_QCOM_SPM_CPUIDLE should also depend on HAVE_ARM_SMCCC since 'select' does not follow any dependency chains.

This fixes a kconfig warning and subsequent build errors:

WARNING: unmet direct dependencies detected for QCOM_SCM
Depends on [n]: (ARM [=y] || ARM64) && HAVE_ARM_SMCCC [=n]
Selected by [y]:
- ARM_QCOM_SPM_CPUIDLE [=y] && CPU_IDLE [=y] && (ARM [=y] || ARM64) && (ARCH_QCOM [=n] || COMPILE_TEST [=y]) && !ARM64 && MMU [=y]

arm-linux-gnueabi-ld: drivers/firmware/qcom_scm-smc.o: in function `__scm_smc_do_quirk':
qcom_scm-smc.c:(.text+0x5c): undefined reference to `__arm_smccc_smc'
arm-linux-gnueabi-ld: drivers/firmware/qcom_scm-legacy.o: in function `scm_legacy_call':
qcom_scm-legacy.c:(.text+0x140): undefined reference to `__arm_smccc_smc'
arm-linux-gnueabi-ld: drivers/firmware/qcom_scm-legacy.o: in function `scm_legacy_call_atomic':
qcom_scm-legacy.c:(.text+0x364): undefined reference to `__arm_smccc_smc'

Quoted 8 lines
Fixes a871be6b8eee ("cpuidle: Convert Qualcomm SPM driver to a generic CPUidle driver")
Cc Stephan Gerhold <[email protected]>
Cc Rafael J. Wysocki <[email protected]>
Cc Andy Gross <[email protected]>
Cc Bjorn Andersson <[email protected]>
Cc He Ying <[email protected]>

There was a similar patch from Arnd a while ago (which fixes another warning for ARM_CPU_SUSPEND?):

https://lore.kernel.org/linux-pm/[email protected]/

I'm not sure who is supposed to pick it up. :)

Thanks!
Stephan

Quoted 14 lines
---
 drivers/cpuidle/Kconfig.arm |    1 +
 1 file changed, 1 insertion(+)
drivers/cpuidle/Kconfig.arm +1 -0
@@ -108,6 +108,7 @@ config ARM_TEGRA_CPUIDLE
 config ARM_QCOM_SPM_CPUIDLE
 	bool "CPU Idle Driver for Qualcomm Subsystem Power Manager (SPM)"
 	depends on (ARCH_QCOM || COMPILE_TEST) && !ARM64 && MMU
+	depends on HAVE_ARM_SMCCC
 	select ARM_CPU_SUSPEND
 	select CPU_IDLE_MULTIPLE_DRIVERS
 	select DT_IDLE_STATES
#2 lore raw
Quoted 29 lines · Stephan Gerhold

Hi!

Quoted 18 lines · Randy Dunlap

QCOM_SCM depends on HAVE_ARM_SMCCC, so ARM_QCOM_SPM_CPUIDLE should also depend on HAVE_ARM_SMCCC since 'select' does not follow any dependency chains.

This fixes a kconfig warning and subsequent build errors:

WARNING: unmet direct dependencies detected for QCOM_SCM
Depends on [n]: (ARM [=y] || ARM64) && HAVE_ARM_SMCCC [=n]
Selected by [y]:
- ARM_QCOM_SPM_CPUIDLE [=y] && CPU_IDLE [=y] && (ARM [=y] || ARM64) && (ARCH_QCOM [=n] || COMPILE_TEST [=y]) && !ARM64 && MMU [=y]

arm-linux-gnueabi-ld: drivers/firmware/qcom_scm-smc.o: in function `__scm_smc_do_quirk':
qcom_scm-smc.c:(.text+0x5c): undefined reference to `__arm_smccc_smc'
arm-linux-gnueabi-ld: drivers/firmware/qcom_scm-legacy.o: in function `scm_legacy_call':
qcom_scm-legacy.c:(.text+0x140): undefined reference to `__arm_smccc_smc'
arm-linux-gnueabi-ld: drivers/firmware/qcom_scm-legacy.o: in function `scm_legacy_call_atomic':
qcom_scm-legacy.c:(.text+0x364): undefined reference to `__arm_smccc_smc'

Quoted 8 lines
Fixes a871be6b8eee ("cpuidle: Convert Qualcomm SPM driver to a generic CPUidle driver")
Cc Stephan Gerhold <[email protected]>
Cc Rafael J. Wysocki <[email protected]>
Cc Andy Gross <[email protected]>
Cc Bjorn Andersson <[email protected]>
Cc He Ying <[email protected]>
Quoted 6 lines

There was a similar patch from Arnd a while ago (which fixes another warning for ARM_CPU_SUSPEND?):

https://lore.kernel.org/linux-pm/[email protected]/

I'm not sure who is supposed to pick it up. :)

ARM cpuidle drivers are maintained by Daniel Lezcano.

Also, please CC power management material to [email protected].

Quoted 15 lines
Quoted 15 lines
---
  drivers/cpuidle/Kconfig.arm |    1 +
  1 file changed, 1 insertion(+)
drivers/cpuidle/Kconfig.arm +1 -0
@@ -108,6 +108,7 @@ config ARM_TEGRA_CPUIDLE
  config ARM_QCOM_SPM_CPUIDLE
  	bool "CPU Idle Driver for Qualcomm Subsystem Power Manager (SPM)"
  	depends on (ARCH_QCOM || COMPILE_TEST) && !ARM64 && MMU
+	depends on HAVE_ARM_SMCCC
  	select ARM_CPU_SUSPEND
  	select CPU_IDLE_MULTIPLE_DRIVERS
  	select DT_IDLE_STATES