aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc/kernel/idle.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ppc/kernel/idle.c')
-rw-r--r--arch/ppc/kernel/idle.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/arch/ppc/kernel/idle.c b/arch/ppc/kernel/idle.c
index a6141f05c919..3c4e4cb61074 100644
--- a/arch/ppc/kernel/idle.c
+++ b/arch/ppc/kernel/idle.c
@@ -63,18 +63,18 @@ void cpu_idle(void)
63 int cpu = smp_processor_id(); 63 int cpu = smp_processor_id();
64 64
65 for (;;) { 65 for (;;) {
66 if (ppc_md.idle != NULL) 66 while (need_resched()) {
67 ppc_md.idle(); 67 if (ppc_md.idle != NULL)
68 else 68 ppc_md.idle();
69 default_idle(); 69 else
70 if (cpu_is_offline(cpu) && system_state == SYSTEM_RUNNING) 70 default_idle();
71 cpu_die();
72 if (need_resched()) {
73 preempt_enable_no_resched();
74 schedule();
75 preempt_disable();
76 } 71 }
77 72
73 if (cpu_is_offline(cpu) && system_state == SYSTEM_RUNNING)
74 cpu_die();
75 preempt_enable_no_resched();
76 schedule();
77 preempt_disable();
78 } 78 }
79} 79}
80 80