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 | 13851966da54be8e37863aa93ee2c8f3d3a3186a (diff) | |
download | kernel_samsung_smdk4412-78ebfa884bcef125464399f8d1cb05937bfeb6e1.zip kernel_samsung_smdk4412-78ebfa884bcef125464399f8d1cb05937bfeb6e1.tar.gz kernel_samsung_smdk4412-78ebfa884bcef125464399f8d1cb05937bfeb6e1.tar.bz2 |
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 35efb2f..09bed44 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) |