diff options
author | Michal Simek <monstr@monstr.eu> | 2010-03-23 15:37:02 +0100 |
---|---|---|
committer | Michal Simek <monstr@monstr.eu> | 2010-04-01 08:38:24 +0200 |
commit | 78ebfa884bcef125464399f8d1cb05937bfeb6e1 (patch) | |
tree | 594faeddafb18ab0deca09ef5cc119d21aee4e0e /arch/microblaze/kernel/process.c | |
parent | microblaze: Add .type and .size to ASM functions (diff) | |
download | linux-78ebfa884bcef125464399f8d1cb05937bfeb6e1.tar.xz linux-78ebfa884bcef125464399f8d1cb05937bfeb6e1.zip |
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.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); 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) |