]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
x86: always enable irqs when entering idle
authorGlauber de Oliveira Costa <gcosta@redhat.com>
Wed, 19 Mar 2008 17:25:06 +0000 (14:25 -0300)
committerIngo Molnar <mingo@elte.hu>
Thu, 17 Apr 2008 15:41:00 +0000 (17:41 +0200)
This matches x86_64 behaviour, which is a superior one IMHO

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/process_32.c

index ec05fb750dfc31a185cd12245520a361d85ad061..08c41ed5e8055bdae7acb6b5f0217f90a815b05d 100644 (file)
@@ -127,6 +127,7 @@ void default_idle(void)
                local_irq_enable();
                current_thread_info()->status |= TS_POLLING;
        } else {
+               local_irq_enable();
                /* loop is done by the caller */
                cpu_relax();
        }
@@ -142,6 +143,7 @@ EXPORT_SYMBOL(default_idle);
  */
 static void poll_idle(void)
 {
+       local_irq_enable();
        cpu_relax();
 }
 
@@ -248,8 +250,11 @@ void mwait_idle_with_hints(unsigned long ax, unsigned long cx)
                __monitor((void *)&current_thread_info()->flags, 0, 0);
                smp_mb();
                if (!need_resched())
-                       __mwait(ax, cx);
-       }
+                       __sti_mwait(ax, cx);
+               else
+                       local_irq_enable();
+       } else
+               local_irq_enable();
 }
 
 /* Default MONITOR/MWAIT with no hints, used for default C1 state */