summaryrefslogtreecommitdiff
path: root/arch/powerpc/kernel/idle.c
diff options
context:
space:
mode:
authorMichal Simek <monstr@monstr.eu>2012-03-30 12:10:03 +0200
committerMichal Simek <monstr@monstr.eu>2012-03-30 12:10:03 +0200
commit6a4770e335bd4df0a4577146f76e116ab6e23f40 (patch)
tree305056c20b6ccf3a4fed00e9e32f3a1dd039cd70 /arch/powerpc/kernel/idle.c
parentac64a9caa55bdfd8d24784f25c68cb7919ddabe3 (diff)
parentf52b69f86e27903d6896ed5fa7cd280fec8de532 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into next
Diffstat (limited to 'arch/powerpc/kernel/idle.c')
-rw-r--r--arch/powerpc/kernel/idle.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/arch/powerpc/kernel/idle.c b/arch/powerpc/kernel/idle.c
index 0a48bf5db6c8..6d2209ac0c44 100644
--- a/arch/powerpc/kernel/idle.c
+++ b/arch/powerpc/kernel/idle.c
@@ -26,11 +26,11 @@
#include <linux/sysctl.h>
#include <linux/tick.h>
-#include <asm/system.h>
#include <asm/processor.h>
#include <asm/cputable.h>
#include <asm/time.h>
#include <asm/machdep.h>
+#include <asm/runlatch.h>
#include <asm/smp.h>
#ifdef CONFIG_HOTPLUG_CPU
@@ -84,7 +84,11 @@ void cpu_idle(void)
start_critical_timings();
- local_irq_enable();
+ /* Some power_save functions return with
+ * interrupts enabled, some don't.
+ */
+ if (irqs_disabled())
+ local_irq_enable();
set_thread_flag(TIF_POLLING_NRFLAG);
} else {
@@ -101,11 +105,11 @@ void cpu_idle(void)
ppc64_runlatch_on();
rcu_idle_exit();
tick_nohz_idle_exit();
- preempt_enable_no_resched();
- if (cpu_should_die())
+ if (cpu_should_die()) {
+ sched_preempt_enable_no_resched();
cpu_die();
- schedule();
- preempt_disable();
+ }
+ schedule_preempt_disabled();
}
}