]> git.hungrycats.org Git - linux/commitdiff
[ARM] Prevent "scheduling while atomic" in cpu_idle()
authorRussell King <rmk@flint.arm.linux.org.uk>
Thu, 16 Jan 2003 14:51:10 +0000 (14:51 +0000)
committerRussell King <rmk@flint.arm.linux.org.uk>
Thu, 16 Jan 2003 14:51:10 +0000 (14:51 +0000)
arch/arm/kernel/process.c

index b5bcb9e52755edd7cc37affc08cf3f0e4b0ae868..6f482ff3936f2b78f7197d99d527ababd0c79cb1 100644 (file)
@@ -91,15 +91,16 @@ void default_idle(void)
 void cpu_idle(void)
 {
        /* endless idle loop with no priority at all */
-       preempt_disable();
        while (1) {
                void (*idle)(void) = pm_idle;
                if (!idle)
                        idle = default_idle;
+               preempt_disable();
                leds_event(led_idle_start);
                while (!need_resched())
                        idle();
                leds_event(led_idle_end);
+               preempt_enable();
                schedule();
        }
 }