diff options
-rw-r--r-- | arch/ia64/kernel/process.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c index e92ea64d8040..4305d2ba76f6 100644 --- a/arch/ia64/kernel/process.c +++ b/arch/ia64/kernel/process.c | |||
@@ -202,12 +202,9 @@ default_idle (void) | |||
202 | { | 202 | { |
203 | local_irq_enable(); | 203 | local_irq_enable(); |
204 | while (!need_resched()) { | 204 | while (!need_resched()) { |
205 | if (can_do_pal_halt) { | 205 | if (can_do_pal_halt) |
206 | local_irq_disable(); | 206 | safe_halt(); |
207 | if (!need_resched()) | 207 | else |
208 | safe_halt(); | ||
209 | local_irq_enable(); | ||
210 | } else | ||
211 | cpu_relax(); | 208 | cpu_relax(); |
212 | } | 209 | } |
213 | } | 210 | } |
@@ -272,10 +269,14 @@ cpu_idle (void) | |||
272 | { | 269 | { |
273 | void (*mark_idle)(int) = ia64_mark_idle; | 270 | void (*mark_idle)(int) = ia64_mark_idle; |
274 | int cpu = smp_processor_id(); | 271 | int cpu = smp_processor_id(); |
275 | set_thread_flag(TIF_POLLING_NRFLAG); | ||
276 | 272 | ||
277 | /* endless idle loop with no priority at all */ | 273 | /* endless idle loop with no priority at all */ |
278 | while (1) { | 274 | while (1) { |
275 | if (can_do_pal_halt) | ||
276 | clear_thread_flag(TIF_POLLING_NRFLAG); | ||
277 | else | ||
278 | set_thread_flag(TIF_POLLING_NRFLAG); | ||
279 | |||
279 | if (!need_resched()) { | 280 | if (!need_resched()) { |
280 | void (*idle)(void); | 281 | void (*idle)(void); |
281 | #ifdef CONFIG_SMP | 282 | #ifdef CONFIG_SMP |