[PATCH] sched: disable preempt in idle tasks
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / arch / arm26 / kernel / process.c
index 9eb9964d32a7368c0b71c53015c75a7e58626f48..15833a0057dd1c9ad7360275cd81b4e1716d053b 100644 (file)
@@ -74,15 +74,13 @@ __setup("hlt", hlt_setup);
 void cpu_idle(void)
 {
        /* endless idle loop with no priority at all */
-       preempt_disable();
        while (1) {
-               while (!need_resched()) {
-                       local_irq_disable();
-                       if (!need_resched() && !hlt_counter)
-                               local_irq_enable();
-               }
+               while (!need_resched())
+                       cpu_relax();
+               preempt_enable_no_resched();
+               schedule();
+               preempt_disable();
        }
-       schedule();
 }
 
 static char reboot_mode = 'h';