Skip to contentSkip to conversation

qcom: spm: allow compile-testing

PATCH In review Arnd Bergmann 2 participants 4 messages Oct 19, 2021 – Oct 20, 2021

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

PATCH 1/3 qcom: spm: allow compile-testing

From: Arnd Bergmann <[email protected]>

ARM_QCOM_SPM_CPUIDLE can be selected when compile-testing on other architectures, but this causes a Kconfig warning for QCOM_SPM:

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

Make it possible to also compile-test this one, which can be done now that v5.15-rc5 lets you select QCOM_SCM everywhere.

Fixes a871be6b8eee ("cpuidle: Convert Qualcomm SPM driver to a generic CPUidle driver")
Fixes 498ba2a8a275 ("cpuidle: Fix ARM_QCOM_SPM_CPUIDLE configuration")

---
Bjorn, if you think this is the right solution, let me know and I can apply it on top of the drivers branch that I have already pulled into the soc tree.

Alternatively, this could go through the cpuidle tree, along with the other two patches.

---
 drivers/soc/qcom/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/soc/qcom/Kconfig +1 -1
index 3cf3a6b41182..e718b8735444 100644
@@ -192,7 +192,7 @@ config QCOM_SOCINFO
 
 config QCOM_SPM
 	tristate "Qualcomm Subsystem Power Manager (SPM)"
-	depends on ARCH_QCOM
+	depends on ARCH_QCOM || COMPILE_TEST
 	select QCOM_SCM
 	help
 	  Enable the support for the Qualcomm Subsystem Power Manager, used
Signature · 1 line
2.29.2
#1 lore raw

PATCH 2/3 cpuidle: tegra: add ARCH_SUSPEND_POSSIBLE dependency

From: Arnd Bergmann <[email protected]>

Some StrongARM processors don't support suspend, which leads to a build failure with the tegra cpuidle driver:

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

arch/arm/kernel/sleep.o: in function `__cpu_suspend':
(.text+0x68): undefined reference to `cpu_sa110_suspend_size'

Add an explicit dependency to make randconfig builds avoid this combination.

Fixes faae6c9f2e68 ("cpuidle: tegra: Enable compile testing")
---
 drivers/cpuidle/Kconfig.arm | 1 +
 1 file changed, 1 insertion(+)
drivers/cpuidle/Kconfig.arm +1 -0
index 15d6c46c0a47..74df12e23546 100644
@@ -100,6 +100,7 @@ config ARM_MVEBU_V7_CPUIDLE
 config ARM_TEGRA_CPUIDLE
 	bool "CPU Idle Driver for NVIDIA Tegra SoCs"
 	depends on (ARCH_TEGRA || COMPILE_TEST) && !ARM64 && MMU
+	depends on ARCH_SUSPEND_POSSIBLE
 	select ARCH_NEEDS_CPU_IDLE_COUPLED if SMP
 	select ARM_CPU_SUSPEND
 	help
Signature · 1 line
2.29.2
#2 lore raw

PATCH 3/3 cpuidle: qcom: add ARCH_SUSPEND_POSSIBLE dependency

In reply to Arnd Bergmann

From: Arnd Bergmann <[email protected]>

Some StrongARM processors don't support suspend, which leads to a build failure with the tegra cpuidle driver:

WARNING: unmet direct dependencies detected for ARM_CPU_SUSPEND
Depends on [n]: ARCH_SUSPEND_POSSIBLE [=n]
Selected by [y]:
- ARM_QCOM_SPM_CPUIDLE [=y] && ...

arch/arm/kernel/sleep.o: in function `__cpu_suspend':
(.text+0x68): undefined reference to `cpu_sa110_suspend_size'

Add an explicit dependency to make randconfig builds avoid this combination.

Fixes a871be6b8eee ("cpuidle: Convert Qualcomm SPM driver to a generic CPUidle driver")
---
 drivers/cpuidle/Kconfig.arm | 1 +
 1 file changed, 1 insertion(+)
drivers/cpuidle/Kconfig.arm +1 -0
index 74df12e23546..1b4f5ae1ee05 100644
@@ -109,6 +109,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 ARCH_SUSPEND_POSSIBLE
 	select ARM_CPU_SUSPEND
 	select CPU_IDLE_MULTIPLE_DRIVERS
 	select DT_IDLE_STATES
Signature · 1 line
2.29.2
Reviewed-by on v1 1/3
#3 lore raw
In reply to Arnd Bergmann

Quoting Arnd Bergmann (2021-10-19 08:42:02)

Quoted 11 lines

From: Arnd Bergmann <[email protected]>

ARM_QCOM_SPM_CPUIDLE can be selected when compile-testing on other architectures, but this causes a Kconfig warning for QCOM_SPM:

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

Quoted 7 lines

Make it possible to also compile-test this one, which can be done now that v5.15-rc5 lets you select QCOM_SCM everywhere.

Fixes a871be6b8eee ("cpuidle: Convert Qualcomm SPM driver to a generic CPUidle driver")
Fixes 498ba2a8a275 ("cpuidle: Fix ARM_QCOM_SPM_CPUIDLE configuration")

---