sh: Only use bl bit toggling for sleeping idle.
We don't actually require this in the cpu_relax() polling case, so just cuddle these around the sleeping version. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This commit is contained in:
@@ -62,6 +62,7 @@ void default_idle(void)
|
|||||||
clear_thread_flag(TIF_POLLING_NRFLAG);
|
clear_thread_flag(TIF_POLLING_NRFLAG);
|
||||||
smp_mb__after_clear_bit();
|
smp_mb__after_clear_bit();
|
||||||
|
|
||||||
|
set_bl_bit();
|
||||||
if (!need_resched()) {
|
if (!need_resched()) {
|
||||||
local_irq_enable();
|
local_irq_enable();
|
||||||
cpu_sleep();
|
cpu_sleep();
|
||||||
@@ -69,6 +70,7 @@ void default_idle(void)
|
|||||||
local_irq_enable();
|
local_irq_enable();
|
||||||
|
|
||||||
set_thread_flag(TIF_POLLING_NRFLAG);
|
set_thread_flag(TIF_POLLING_NRFLAG);
|
||||||
|
clear_bl_bit();
|
||||||
} else
|
} else
|
||||||
poll_idle();
|
poll_idle();
|
||||||
}
|
}
|
||||||
@@ -92,7 +94,6 @@ void cpu_idle(void)
|
|||||||
check_pgt_cache();
|
check_pgt_cache();
|
||||||
rmb();
|
rmb();
|
||||||
|
|
||||||
set_bl_bit();
|
|
||||||
local_irq_disable();
|
local_irq_disable();
|
||||||
/* Don't trace irqs off for idle */
|
/* Don't trace irqs off for idle */
|
||||||
stop_critical_timings();
|
stop_critical_timings();
|
||||||
@@ -103,7 +104,6 @@ void cpu_idle(void)
|
|||||||
*/
|
*/
|
||||||
WARN_ON(irqs_disabled());
|
WARN_ON(irqs_disabled());
|
||||||
start_critical_timings();
|
start_critical_timings();
|
||||||
clear_bl_bit();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tick_nohz_restart_sched_tick();
|
tick_nohz_restart_sched_tick();
|
||||||
|
Reference in New Issue
Block a user