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

arm64: cpuidle: remove generic cpuidle support

The arm64 support of the generic ARM cpuidle driver was removed. This
let us remove all support code for it.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20220529181329.2345722-3-michael@walle.cc
Signed-off-by: Will Deacon <will@kernel.org>

authored by

Michael Walle and committed by
Will Deacon
471f80db 51280aca

-53
-9
arch/arm64/include/asm/cpu_ops.h
··· 31 31 * @cpu_die: Makes a cpu leave the kernel. Must not fail. Called from the 32 32 * cpu being killed. 33 33 * @cpu_kill: Ensures a cpu has left the kernel. Called from another cpu. 34 - * @cpu_init_idle: Reads any data necessary to initialize CPU idle states for 35 - * a proposed logical id. 36 - * @cpu_suspend: Suspends a cpu and saves the required context. May fail owing 37 - * to wrong parameters or error conditions. Called from the 38 - * CPU being suspended. Must be called with IRQs disabled. 39 34 */ 40 35 struct cpu_operations { 41 36 const char *name; ··· 43 48 int (*cpu_disable)(unsigned int cpu); 44 49 void (*cpu_die)(unsigned int cpu); 45 50 int (*cpu_kill)(unsigned int cpu); 46 - #endif 47 - #ifdef CONFIG_CPU_IDLE 48 - int (*cpu_init_idle)(unsigned int); 49 - int (*cpu_suspend)(unsigned long); 50 51 #endif 51 52 }; 52 53
-15
arch/arm64/include/asm/cpuidle.h
··· 4 4 5 5 #include <asm/proc-fns.h> 6 6 7 - #ifdef CONFIG_CPU_IDLE 8 - extern int arm_cpuidle_init(unsigned int cpu); 9 - extern int arm_cpuidle_suspend(int index); 10 - #else 11 - static inline int arm_cpuidle_init(unsigned int cpu) 12 - { 13 - return -EOPNOTSUPP; 14 - } 15 - 16 - static inline int arm_cpuidle_suspend(int index) 17 - { 18 - return -EOPNOTSUPP; 19 - } 20 - #endif 21 - 22 7 #ifdef CONFIG_ARM64_PSEUDO_NMI 23 8 #include <asm/arch_gicv3.h> 24 9
-29
arch/arm64/kernel/cpuidle.c
··· 13 13 #include <linux/of_device.h> 14 14 #include <linux/psci.h> 15 15 16 - #include <asm/cpuidle.h> 17 - #include <asm/cpu_ops.h> 18 - 19 - int arm_cpuidle_init(unsigned int cpu) 20 - { 21 - const struct cpu_operations *ops = get_cpu_ops(cpu); 22 - int ret = -EOPNOTSUPP; 23 - 24 - if (ops && ops->cpu_suspend && ops->cpu_init_idle) 25 - ret = ops->cpu_init_idle(cpu); 26 - 27 - return ret; 28 - } 29 - 30 - /** 31 - * arm_cpuidle_suspend() - function to enter a low-power idle state 32 - * @index: argument to pass to CPU suspend operations 33 - * 34 - * Return: 0 on success, -EOPNOTSUPP if CPU suspend hook not initialized, CPU 35 - * operations back-end error code otherwise. 36 - */ 37 - int arm_cpuidle_suspend(int index) 38 - { 39 - int cpu = smp_processor_id(); 40 - const struct cpu_operations *ops = get_cpu_ops(cpu); 41 - 42 - return ops->cpu_suspend(index); 43 - } 44 - 45 16 #ifdef CONFIG_ACPI 46 17 47 18 #include <acpi/processor.h>