]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/ppc/kernel/idle.c
Pull altix-ce1.0-asic into release branch
[linux-2.6-omap-h63xx.git] / arch / ppc / kernel / idle.c
index 3c4e4cb610743e070d7237ed7df5fff2fa67c75e..1be3ca5bae4009026616423ef88dc623eccfce57 100644 (file)
@@ -37,7 +37,6 @@
 void default_idle(void)
 {
        void (*powersave)(void);
-       int cpu = smp_processor_id();
 
        powersave = ppc_md.power_save;
 
@@ -47,7 +46,8 @@ void default_idle(void)
 #ifdef CONFIG_SMP
                else {
                        set_thread_flag(TIF_POLLING_NRFLAG);
-                       while (!need_resched() && !cpu_is_offline(cpu))
+                       while (!need_resched() &&
+                                       !cpu_is_offline(smp_processor_id()))
                                barrier();
                        clear_thread_flag(TIF_POLLING_NRFLAG);
                }
@@ -63,7 +63,7 @@ void cpu_idle(void)
        int cpu = smp_processor_id();
 
        for (;;) {
-               while (need_resched()) {
+               while (!need_resched()) {
                        if (ppc_md.idle != NULL)
                                ppc_md.idle();
                        else