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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user