Skip to contentSkip to conversation

cpuidle: arm: qcom: fix Kconfig problems

PATCH In review Randy Dunlap 2 participants 2 messages Nov 24, 2020

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

PATCH v2 1/1 cpuidle: arm: qcom: fix Kconfig problems

The Kconfig symbol ARM_QCOM_SPM_CPUIDLE wildly selects other Kconfig symbols when it should not.
This causes kconfig warnings and subsequent build errors, as listed below, so modify this symbol's Kconfig entry to constrain and tame it.

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

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

and

arm-linux-gnueabi-ld: arch/arm/kernel/sleep.o: in function `__cpu_suspend':
(.text+0x68): undefined reference to `cpu_sa110_suspend_size'
arm-linux-gnueabi-ld: arch/arm/kernel/suspend.o: in function `__cpu_suspend_save':
suspend.c:(.text+0x138): undefined reference to `cpu_sa110_do_suspend'
arm-linux-gnueabi-ld: suspend.c:(.text+0x170): undefined reference to `cpu_sa110_do_resume'
arm-linux-gnueabi-ld: drivers/firmware/qcom_scm-smc.o: in function `__scm_smc_do_quirk':
qcom_scm-smc.c:(.text+0x54): 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+0x168): 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+0x2e0): undefined reference to `__arm_smccc_smc'

Fixes a871be6b8eee ("cpuidle: Convert Qualcomm SPM driver to a generic CPUidle driver")
Cc Andy Gross <[email protected]>
Cc Bjorn Andersson <[email protected]>
Cc "Rafael J. Wysocki" <[email protected]>
Cc Daniel Lezcano <[email protected]>
Cc Stephan Gerhold <[email protected]>
Cc Lina Iyer <[email protected]>
Cc Ulf Hansson <[email protected]>
Cc Bjorn Andersson <[email protected]>
Cc John Stultz <[email protected]>

---
v2: change to depends on QCOM_SCM (suggested by Bjorn)

 drivers/cpuidle/Kconfig.arm |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/cpuidle/Kconfig.arm +1 -1
@@ -108,10 +108,10 @@ 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
+	depends on QCOM_SCM
 	select ARM_CPU_SUSPEND
 	select CPU_IDLE_MULTIPLE_DRIVERS
 	select DT_IDLE_STATES
-	select QCOM_SCM
 	help
 	  Select this to enable cpuidle for Qualcomm processors.
 	  The Subsystem Power Manager (SPM) controls low power modes for the
Reviewed-by on v2 1/1
#1 lore raw
Quoted 30 lines · Randy Dunlap

The Kconfig symbol ARM_QCOM_SPM_CPUIDLE wildly selects other Kconfig symbols when it should not.
This causes kconfig warnings and subsequent build errors, as listed below, so modify this symbol's Kconfig entry to constrain and tame it.

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

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

and

arm-linux-gnueabi-ld: arch/arm/kernel/sleep.o: in function `__cpu_suspend':
(.text+0x68): undefined reference to `cpu_sa110_suspend_size'
arm-linux-gnueabi-ld: arch/arm/kernel/suspend.o: in function `__cpu_suspend_save':
suspend.c:(.text+0x138): undefined reference to `cpu_sa110_do_suspend'
arm-linux-gnueabi-ld: suspend.c:(.text+0x170): undefined reference to `cpu_sa110_do_resume'
arm-linux-gnueabi-ld: drivers/firmware/qcom_scm-smc.o: in function `__scm_smc_do_quirk':
qcom_scm-smc.c:(.text+0x54): 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+0x168): 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+0x2e0): undefined reference to `__arm_smccc_smc'

Quoted 14 lines
Fixes a871be6b8eee ("cpuidle: Convert Qualcomm SPM driver to a generic CPUidle driver")
Cc Andy Gross <[email protected]>
Cc Bjorn Andersson <[email protected]>
Cc "Rafael J. Wysocki" <[email protected]>
Cc Daniel Lezcano <[email protected]>
Cc Stephan Gerhold <[email protected]>
Cc Lina Iyer <[email protected]>
Cc Ulf Hansson <[email protected]>
Cc Bjorn Andersson <[email protected]>
Cc John Stultz <[email protected]>

Regards,
Bjorn

Quoted 20 lines

---
v2: change to depends on QCOM_SCM (suggested by Bjorn)

 drivers/cpuidle/Kconfig.arm |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/cpuidle/Kconfig.arm +1 -1
@@ -108,10 +108,10 @@ 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
+	depends on QCOM_SCM
 	select ARM_CPU_SUSPEND
 	select CPU_IDLE_MULTIPLE_DRIVERS
 	select DT_IDLE_STATES
-	select QCOM_SCM
 	help
 	  Select this to enable cpuidle for Qualcomm processors.
 	  The Subsystem Power Manager (SPM) controls low power modes for the