Lines Matching +full:cpu +full:- +full:idle +full:- +full:states
1 // SPDX-License-Identifier: GPL-2.0-only
3 * ARM/ARM64 generic CPU idle driver.
25 * arm_enter_idle_state - Programs CPU to enter the specified state
38 * Pass idle state index to arm_cpuidle_suspend which in turn in arm_enter_idle_state()
39 * will call the CPU ops suspend protocol with idle index as a in arm_enter_idle_state()
53 * handler for idle state index 0.
55 .states[0] = {
66 { .compatible = "arm,idle-state",
75 * framework. It relies on core code to parse the idle states
78 static int __init arm_idle_init_cpu(int cpu) in arm_idle_init_cpu() argument
85 return -ENOMEM; in arm_idle_init_cpu()
87 drv->cpumask = (struct cpumask *)cpumask_of(cpu); in arm_idle_init_cpu()
90 * Initialize idle states data, starting at index 1. This in arm_idle_init_cpu()
91 * driver is DT only, if no DT idle states are detected (ret in arm_idle_init_cpu()
93 * there is no reason to initialize the idle driver if only in arm_idle_init_cpu()
98 ret = ret ? : -ENODEV; in arm_idle_init_cpu()
103 * Call arch CPU operations in order to initialize in arm_idle_init_cpu()
104 * idle states suspend back-end specific data in arm_idle_init_cpu()
106 ret = arm_cpuidle_init(cpu); in arm_idle_init_cpu()
110 * reported failure is a HW misconfiguration/breakage (-ENXIO). in arm_idle_init_cpu()
112 * Some platforms do not support idle operations in arm_idle_init_cpu()
113 * (arm_cpuidle_init() returning -EOPNOTSUPP), we should in arm_idle_init_cpu()
118 if (ret != -EOPNOTSUPP) in arm_idle_init_cpu()
119 pr_err("CPU %d failed to init idle CPU ops\n", cpu); in arm_idle_init_cpu()
120 ret = ret == -ENXIO ? 0 : ret; in arm_idle_init_cpu()
138 * arm_idle_init - Initializes arm cpuidle driver
140 * Initializes arm cpuidle driver for all CPUs, if any CPU fails
146 int cpu, ret; in arm_idle_init() local
150 for_each_possible_cpu(cpu) { in arm_idle_init()
151 ret = arm_idle_init_cpu(cpu); in arm_idle_init()
159 while (--cpu >= 0) { in arm_idle_init()
160 dev = per_cpu(cpuidle_devices, cpu); in arm_idle_init()