Skip to content

Commit

Permalink
sh: do not latency trace idle.
Browse files Browse the repository at this point in the history
Description snipped from Steven Rostedt's PPC patch:

    When idle is called, interrupts are blocked, but the idle
    function will still wake up on an interrupt. The problem is
    that the interrupt disabled latency tracer will take this call
    to idle as a latency.

    This patch disables the latency tracing when going into idle.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Paul Mundt committed Dec 22, 2008
1 parent 75fd24c commit f74c034
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions arch/sh/kernel/process_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,12 @@ static void default_idle(void)
clear_thread_flag(TIF_POLLING_NRFLAG);
smp_mb__after_clear_bit();
set_bl_bit();
stop_critical_timings();

while (!need_resched())
cpu_sleep();

start_critical_timings();
clear_bl_bit();
set_thread_flag(TIF_POLLING_NRFLAG);
} else
Expand Down

0 comments on commit f74c034

Please sign in to comment.