diff options
Diffstat (limited to 'arch/microblaze/kernel/process.c')
-rw-r--r-- | arch/microblaze/kernel/process.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/microblaze/kernel/process.c b/arch/microblaze/kernel/process.c index 35efb2f42d50..09bed44dfcd3 100644 --- a/arch/microblaze/kernel/process.c +++ b/arch/microblaze/kernel/process.c | |||
@@ -75,7 +75,10 @@ __setup("hlt", hlt_setup); | |||
75 | 75 | ||
76 | void default_idle(void) | 76 | void default_idle(void) |
77 | { | 77 | { |
78 | if (!hlt_counter) { | 78 | if (likely(hlt_counter)) { |
79 | while (!need_resched()) | ||
80 | cpu_relax(); | ||
81 | } else { | ||
79 | clear_thread_flag(TIF_POLLING_NRFLAG); | 82 | clear_thread_flag(TIF_POLLING_NRFLAG); |
80 | smp_mb__after_clear_bit(); | 83 | smp_mb__after_clear_bit(); |
81 | local_irq_disable(); | 84 | local_irq_disable(); |
@@ -83,9 +86,7 @@ void default_idle(void) | |||
83 | cpu_sleep(); | 86 | cpu_sleep(); |
84 | local_irq_enable(); | 87 | local_irq_enable(); |
85 | set_thread_flag(TIF_POLLING_NRFLAG); | 88 | set_thread_flag(TIF_POLLING_NRFLAG); |
86 | } else | 89 | } |
87 | while (!need_resched()) | ||
88 | cpu_relax(); | ||
89 | } | 90 | } |
90 | 91 | ||
91 | void cpu_idle(void) | 92 | void cpu_idle(void) |