diff options
Diffstat (limited to 'arch/microblaze/kernel/process.c')
-rw-r--r-- | arch/microblaze/kernel/process.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/microblaze/kernel/process.c b/arch/microblaze/kernel/process.c index 812f1bf06c9e..09bed44dfcd3 100644 --- a/arch/microblaze/kernel/process.c +++ b/arch/microblaze/kernel/process.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/bitops.h> | 15 | #include <linux/bitops.h> |
16 | #include <asm/system.h> | 16 | #include <asm/system.h> |
17 | #include <asm/pgalloc.h> | 17 | #include <asm/pgalloc.h> |
18 | #include <asm/uaccess.h> /* for USER_DS macros */ | ||
18 | #include <asm/cacheflush.h> | 19 | #include <asm/cacheflush.h> |
19 | 20 | ||
20 | void show_regs(struct pt_regs *regs) | 21 | void show_regs(struct pt_regs *regs) |
@@ -74,7 +75,10 @@ __setup("hlt", hlt_setup); | |||
74 | 75 | ||
75 | void default_idle(void) | 76 | void default_idle(void) |
76 | { | 77 | { |
77 | if (!hlt_counter) { | 78 | if (likely(hlt_counter)) { |
79 | while (!need_resched()) | ||
80 | cpu_relax(); | ||
81 | } else { | ||
78 | clear_thread_flag(TIF_POLLING_NRFLAG); | 82 | clear_thread_flag(TIF_POLLING_NRFLAG); |
79 | smp_mb__after_clear_bit(); | 83 | smp_mb__after_clear_bit(); |
80 | local_irq_disable(); | 84 | local_irq_disable(); |
@@ -82,9 +86,7 @@ void default_idle(void) | |||
82 | cpu_sleep(); | 86 | cpu_sleep(); |
83 | local_irq_enable(); | 87 | local_irq_enable(); |
84 | set_thread_flag(TIF_POLLING_NRFLAG); | 88 | set_thread_flag(TIF_POLLING_NRFLAG); |
85 | } else | 89 | } |
86 | while (!need_resched()) | ||
87 | cpu_relax(); | ||
88 | } | 90 | } |
89 | 91 | ||
90 | void cpu_idle(void) | 92 | void cpu_idle(void) |