aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/process.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-03-23 20:30:49 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-23 20:30:49 -0400
commit56c10bf82c10588b743e75a13a7949e11b9fc942 (patch)
treea2eda0459abb314107ac64af770bf7fb360aefc6 /arch/arm/kernel/process.c
parentbab2d8c6020e1d7521cb6c4939f72b061ce947bc (diff)
parent61b80086a525c8a6081257ae40da5dee2bcaee16 (diff)
Merge branch 'for-armsoc' of git://git.linaro.org/people/rmk/linux-arm
Pull #1 ARM updates from Russell King: "This one covers stuff which Arnd is waiting for me to push, as this is shared between both our trees and probably other trees elsewhere. Essentially, this contains: - AMBA primecell device initializer updates - mostly shrinking the size of the device declarations in platform code to something more reasonable. - Getting rid of the NO_IRQ crap from AMBA primecell stuff. - Nicolas' idle cleanups. This in combination with the restart cleanups from the last merge window results in a great many mach/system.h files being deleted." Yay: ~80 files, ~2000 lines deleted. * 'for-armsoc' of git://git.linaro.org/people/rmk/linux-arm: (60 commits) ARM: remove disable_fiq and arch_ret_to_user macros ARM: make entry-macro.S depend on !MULTI_IRQ_HANDLER ARM: rpc: make default fiq handler run-time installed ARM: make arch_ret_to_user macro optional ARM: amba: samsung: use common amba device initializers ARM: amba: spear: use common amba device initializers ARM: amba: nomadik: use common amba device initializers ARM: amba: u300: use common amba device initializers ARM: amba: lpc32xx: use common amba device initializers ARM: amba: netx: use common amba device initializers ARM: amba: bcmring: use common amba device initializers ARM: amba: ep93xx: use common amba device initializers ARM: amba: omap2: use common amba device initializers ARM: amba: integrator: use common amba device initializers ARM: amba: realview: get rid of private platform amba_device initializer ARM: amba: versatile: get rid of private platform amba_device initializer ARM: amba: vexpress: get rid of private platform amba_device initializer ARM: amba: provide common initializers for static amba devices ARM: amba: make use of -1 IRQs warn ARM: amba: u300: get rid of NO_IRQ initializers ...
Diffstat (limited to 'arch/arm/kernel/process.c')
-rw-r--r--arch/arm/kernel/process.c27
1 files changed, 16 insertions, 11 deletions
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
index 219e4efee1a6..d3eca4524533 100644
--- a/arch/arm/kernel/process.c
+++ b/arch/arm/kernel/process.c
@@ -61,8 +61,6 @@ extern void setup_mm_for_reboot(void);
61 61
62static volatile int hlt_counter; 62static volatile int hlt_counter;
63 63
64#include <mach/system.h>
65
66void disable_hlt(void) 64void disable_hlt(void)
67{ 65{
68 hlt_counter++; 66 hlt_counter++;
@@ -181,13 +179,17 @@ void cpu_idle_wait(void)
181EXPORT_SYMBOL_GPL(cpu_idle_wait); 179EXPORT_SYMBOL_GPL(cpu_idle_wait);
182 180
183/* 181/*
184 * This is our default idle handler. We need to disable 182 * This is our default idle handler.
185 * interrupts here to ensure we don't miss a wakeup call.
186 */ 183 */
184
185void (*arm_pm_idle)(void);
186
187static void default_idle(void) 187static void default_idle(void)
188{ 188{
189 if (!need_resched()) 189 if (arm_pm_idle)
190 arch_idle(); 190 arm_pm_idle();
191 else
192 cpu_do_idle();
191 local_irq_enable(); 193 local_irq_enable();
192} 194}
193 195
@@ -215,6 +217,10 @@ void cpu_idle(void)
215 cpu_die(); 217 cpu_die();
216#endif 218#endif
217 219
220 /*
221 * We need to disable interrupts here
222 * to ensure we don't miss a wakeup call.
223 */
218 local_irq_disable(); 224 local_irq_disable();
219#ifdef CONFIG_PL310_ERRATA_769419 225#ifdef CONFIG_PL310_ERRATA_769419
220 wmb(); 226 wmb();
@@ -222,19 +228,18 @@ void cpu_idle(void)
222 if (hlt_counter) { 228 if (hlt_counter) {
223 local_irq_enable(); 229 local_irq_enable();
224 cpu_relax(); 230 cpu_relax();
225 } else { 231 } else if (!need_resched()) {
226 stop_critical_timings(); 232 stop_critical_timings();
227 if (cpuidle_idle_call()) 233 if (cpuidle_idle_call())
228 pm_idle(); 234 pm_idle();
229 start_critical_timings(); 235 start_critical_timings();
230 /* 236 /*
231 * This will eventually be removed - pm_idle 237 * pm_idle functions must always
232 * functions should always return with IRQs 238 * return with IRQs enabled.
233 * enabled.
234 */ 239 */
235 WARN_ON(irqs_disabled()); 240 WARN_ON(irqs_disabled());
241 } else
236 local_irq_enable(); 242 local_irq_enable();
237 }
238 } 243 }
239 leds_event(led_idle_end); 244 leds_event(led_idle_end);
240 rcu_idle_exit(); 245 rcu_idle_exit();