summaryrefslogtreecommitdiffstats
path: root/arch/microblaze/kernel/process.c
diff options
context:
space:
mode:
authorMichal Simek <monstr@monstr.eu>2010-03-23 15:37:02 +0100
committerMichal Simek <monstr@monstr.eu>2010-04-01 08:38:24 +0200
commit78ebfa884bcef125464399f8d1cb05937bfeb6e1 (patch)
tree594faeddafb18ab0deca09ef5cc119d21aee4e0e /arch/microblaze/kernel/process.c
parent13851966da54be8e37863aa93ee2c8f3d3a3186a (diff)
microblaze: Adding likely macros
On the base on GCOV analytics is helpful to add likely/unlikely macros. Signed-off-by: Michal Simek <monstr@monstr.eu>
Diffstat (limited to 'arch/microblaze/kernel/process.c')
-rw-r--r--arch/microblaze/kernel/process.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/microblaze/kernel/process.c b/arch/microblaze/kernel/process.c
index 35efb2f42d5..09bed44dfcd 100644
--- a/arch/microblaze/kernel/process.c
+++ b/arch/microblaze/kernel/process.c
@@ -75,7 +75,10 @@ __setup("hlt", hlt_setup);
void default_idle(void)
{
- if (!hlt_counter) {
+ if (likely(hlt_counter)) {
+ while (!need_resched())
+ cpu_relax();
+ } else {
clear_thread_flag(TIF_POLLING_NRFLAG);
smp_mb__after_clear_bit();
local_irq_disable();
@@ -83,9 +86,7 @@ void default_idle(void)
cpu_sleep();
local_irq_enable();
set_thread_flag(TIF_POLLING_NRFLAG);
- } else
- while (!need_resched())
- cpu_relax();
+ }
}
void cpu_idle(void)