Skip to content

Commit

Permalink
sh: Only use bl bit toggling for sleeping idle.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Paul Mundt committed Dec 21, 2009
1 parent 3147093 commit 73a38b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/sh/kernel/idle.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,15 @@ void default_idle(void)
clear_thread_flag(TIF_POLLING_NRFLAG);
smp_mb__after_clear_bit();

set_bl_bit();
if (!need_resched()) {
local_irq_enable();
cpu_sleep();
} else
local_irq_enable();

set_thread_flag(TIF_POLLING_NRFLAG);
clear_bl_bit();
} else
poll_idle();
}
Expand All @@ -92,7 +94,6 @@ void cpu_idle(void)
check_pgt_cache();
rmb();

set_bl_bit();
local_irq_disable();
/* Don't trace irqs off for idle */
stop_critical_timings();
Expand All @@ -103,7 +104,6 @@ void cpu_idle(void)
*/
WARN_ON(irqs_disabled());
start_critical_timings();
clear_bl_bit();
}

tick_nohz_restart_sched_tick();
Expand Down

0 comments on commit 73a38b8

Please sign in to comment.