diff options
author | Glauber de Oliveira Costa <gcosta@redhat.com> | 2008-03-19 13:25:06 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-17 11:41:00 -0400 |
commit | 3b22ec7b13cb31e0d87fbc0aabe14caaaad309e8 (patch) | |
tree | 9a68b5a0a8d7b63d5773f61c27237f7d1f2290ec /arch/x86 | |
parent | 1d89a7f072d4f76f0538edfb474d527066ee7838 (diff) |
x86: always enable irqs when entering idle
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>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kernel/process_32.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c index ec05fb750dfc..08c41ed5e805 100644 --- a/arch/x86/kernel/process_32.c +++ b/arch/x86/kernel/process_32.c | |||
@@ -127,6 +127,7 @@ void default_idle(void) | |||
127 | local_irq_enable(); | 127 | local_irq_enable(); |
128 | current_thread_info()->status |= TS_POLLING; | 128 | current_thread_info()->status |= TS_POLLING; |
129 | } else { | 129 | } else { |
130 | local_irq_enable(); | ||
130 | /* loop is done by the caller */ | 131 | /* loop is done by the caller */ |
131 | cpu_relax(); | 132 | cpu_relax(); |
132 | } | 133 | } |
@@ -142,6 +143,7 @@ EXPORT_SYMBOL(default_idle); | |||
142 | */ | 143 | */ |
143 | static void poll_idle(void) | 144 | static void poll_idle(void) |
144 | { | 145 | { |
146 | local_irq_enable(); | ||
145 | cpu_relax(); | 147 | cpu_relax(); |
146 | } | 148 | } |
147 | 149 | ||
@@ -248,8 +250,11 @@ void mwait_idle_with_hints(unsigned long ax, unsigned long cx) | |||
248 | __monitor((void *)¤t_thread_info()->flags, 0, 0); | 250 | __monitor((void *)¤t_thread_info()->flags, 0, 0); |
249 | smp_mb(); | 251 | smp_mb(); |
250 | if (!need_resched()) | 252 | if (!need_resched()) |
251 | __mwait(ax, cx); | 253 | __sti_mwait(ax, cx); |
252 | } | 254 | else |
255 | local_irq_enable(); | ||
256 | } else | ||
257 | local_irq_enable(); | ||
253 | } | 258 | } |
254 | 259 | ||
255 | /* Default MONITOR/MWAIT with no hints, used for default C1 state */ | 260 | /* Default MONITOR/MWAIT with no hints, used for default C1 state */ |