Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

cpuidle: add ARCH_SUSPEND_POSSIBLE dependencies

Some ARMv4 processors don't support suspend, which leads
to a build failure with the tegra and qualcomm 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'
(.text+0x68): undefined reference to `cpu_fa526_suspend_size'

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

Fixes: faae6c9f2e68 ("cpuidle: tegra: Enable compile testing")
Fixes: a871be6b8eee ("cpuidle: Convert Qualcomm SPM driver to a generic CPUidle driver")
Link: https://lore.kernel.org/all/20211013160125.772873-1-arnd@kernel.org/
Cc: All applicable <stable@vger.kernel.org>
Reviewed-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

authored by

Arnd Bergmann and committed by
Rafael J. Wysocki
7787943a 74528edf

+2
+2
drivers/cpuidle/Kconfig.arm
··· 102 102 config ARM_TEGRA_CPUIDLE 103 103 bool "CPU Idle Driver for NVIDIA Tegra SoCs" 104 104 depends on (ARCH_TEGRA || COMPILE_TEST) && !ARM64 && MMU 105 + depends on ARCH_SUSPEND_POSSIBLE 105 106 select ARCH_NEEDS_CPU_IDLE_COUPLED if SMP 106 107 select ARM_CPU_SUSPEND 107 108 help ··· 111 110 config ARM_QCOM_SPM_CPUIDLE 112 111 bool "CPU Idle Driver for Qualcomm Subsystem Power Manager (SPM)" 113 112 depends on (ARCH_QCOM || COMPILE_TEST) && !ARM64 && MMU 113 + depends on ARCH_SUSPEND_POSSIBLE 114 114 select ARM_CPU_SUSPEND 115 115 select CPU_IDLE_MULTIPLE_DRIVERS 116 116 select DT_IDLE_STATES