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>
This commit is contained in:
Michal Simek
2010-03-23 15:37:02 +01:00
parent 13851966da
commit 78ebfa884b
6 changed files with 28 additions and 26 deletions

View File

@@ -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)