diff options
Diffstat (limited to 'arch/powerpc/kernel/idle.c')
-rw-r--r-- | arch/powerpc/kernel/idle.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/idle.c b/arch/powerpc/kernel/idle.c index 9c3cd490b1bd..7c66ce13da89 100644 --- a/arch/powerpc/kernel/idle.c +++ b/arch/powerpc/kernel/idle.c | |||
@@ -39,9 +39,13 @@ | |||
39 | #define cpu_should_die() 0 | 39 | #define cpu_should_die() 0 |
40 | #endif | 40 | #endif |
41 | 41 | ||
42 | unsigned long cpuidle_disable = IDLE_NO_OVERRIDE; | ||
43 | EXPORT_SYMBOL(cpuidle_disable); | ||
44 | |||
42 | static int __init powersave_off(char *arg) | 45 | static int __init powersave_off(char *arg) |
43 | { | 46 | { |
44 | ppc_md.power_save = NULL; | 47 | ppc_md.power_save = NULL; |
48 | cpuidle_disable = IDLE_POWERSAVE_OFF; | ||
45 | return 0; | 49 | return 0; |
46 | } | 50 | } |
47 | __setup("powersave=off", powersave_off); | 51 | __setup("powersave=off", powersave_off); |
@@ -113,6 +117,29 @@ void cpu_idle(void) | |||
113 | } | 117 | } |
114 | } | 118 | } |
115 | 119 | ||
120 | |||
121 | /* | ||
122 | * cpu_idle_wait - Used to ensure that all the CPUs come out of the old | ||
123 | * idle loop and start using the new idle loop. | ||
124 | * Required while changing idle handler on SMP systems. | ||
125 | * Caller must have changed idle handler to the new value before the call. | ||
126 | * This window may be larger on shared systems. | ||
127 | */ | ||
128 | void cpu_idle_wait(void) | ||
129 | { | ||
130 | int cpu; | ||
131 | smp_mb(); | ||
132 | |||
133 | /* kick all the CPUs so that they exit out of old idle routine */ | ||
134 | get_online_cpus(); | ||
135 | for_each_online_cpu(cpu) { | ||
136 | if (cpu != smp_processor_id()) | ||
137 | smp_send_reschedule(cpu); | ||
138 | } | ||
139 | put_online_cpus(); | ||
140 | } | ||
141 | EXPORT_SYMBOL_GPL(cpu_idle_wait); | ||
142 | |||
116 | int powersave_nap; | 143 | int powersave_nap; |
117 | 144 | ||
118 | #ifdef CONFIG_SYSCTL | 145 | #ifdef CONFIG_SYSCTL |