aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2012-07-10 05:16:43 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2012-07-10 05:16:43 -0400
commit50bba07d6a16ce4a3b4f6abb44bfd3645c046ef6 (patch)
treec76f080377dd611857fa33f38a2b8a2af4576f8b /arch/powerpc/platforms
parenta8b91e43afd736fcebb0836359e5ddaeae45b2ab (diff)
parent50fb31cfed9218b439360caf7c0399b00042da15 (diff)
Merge branch 'merge' into next
We want to bring in the latest IRQ fixes
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r--arch/powerpc/platforms/cell/pervasive.c11
-rw-r--r--arch/powerpc/platforms/pseries/processor_idle.c17
2 files changed, 16 insertions, 12 deletions
diff --git a/arch/powerpc/platforms/cell/pervasive.c b/arch/powerpc/platforms/cell/pervasive.c
index efdacc829576..d17e98bc0c10 100644
--- a/arch/powerpc/platforms/cell/pervasive.c
+++ b/arch/powerpc/platforms/cell/pervasive.c
@@ -42,11 +42,9 @@ static void cbe_power_save(void)
42{ 42{
43 unsigned long ctrl, thread_switch_control; 43 unsigned long ctrl, thread_switch_control;
44 44
45 /* 45 /* Ensure our interrupt state is properly tracked */
46 * We need to hard disable interrupts, the local_irq_enable() done by 46 if (!prep_irq_for_idle())
47 * our caller upon return will hard re-enable. 47 return;
48 */
49 hard_irq_disable();
50 48
51 ctrl = mfspr(SPRN_CTRLF); 49 ctrl = mfspr(SPRN_CTRLF);
52 50
@@ -81,6 +79,9 @@ static void cbe_power_save(void)
81 */ 79 */
82 ctrl &= ~(CTRL_RUNLATCH | CTRL_TE); 80 ctrl &= ~(CTRL_RUNLATCH | CTRL_TE);
83 mtspr(SPRN_CTRLT, ctrl); 81 mtspr(SPRN_CTRLT, ctrl);
82
83 /* Re-enable interrupts in MSR */
84 __hard_irq_enable();
84} 85}
85 86
86static int cbe_system_reset_exception(struct pt_regs *regs) 87static int cbe_system_reset_exception(struct pt_regs *regs)
diff --git a/arch/powerpc/platforms/pseries/processor_idle.c b/arch/powerpc/platforms/pseries/processor_idle.c
index a97ef6692dad..7f5668b94165 100644
--- a/arch/powerpc/platforms/pseries/processor_idle.c
+++ b/arch/powerpc/platforms/pseries/processor_idle.c
@@ -100,15 +100,18 @@ out:
100static void check_and_cede_processor(void) 100static void check_and_cede_processor(void)
101{ 101{
102 /* 102 /*
103 * Interrupts are soft-disabled at this point, 103 * Ensure our interrupt state is properly tracked,
104 * but not hard disabled. So an interrupt might have 104 * also checks if no interrupt has occurred while we
105 * occurred before entering NAP, and would be potentially 105 * were soft-disabled
106 * lost (edge events, decrementer events, etc...) unless
107 * we first hard disable then check.
108 */ 106 */
109 hard_irq_disable(); 107 if (prep_irq_for_idle()) {
110 if (!lazy_irq_pending())
111 cede_processor(); 108 cede_processor();
109#ifdef CONFIG_TRACE_IRQFLAGS
110 /* Ensure that H_CEDE returns with IRQs on */
111 if (WARN_ON(!(mfmsr() & MSR_EE)))
112 __hard_irq_enable();
113#endif
114 }
112} 115}
113 116
114static int dedicated_cede_loop(struct cpuidle_device *dev, 117static int dedicated_cede_loop(struct cpuidle_device *dev,