Skip to content

Commit

Permalink
powerpc: ftrace, do not latency trace idle
Browse files Browse the repository at this point in the history
Impact: fix for irq off latency tracer

When idle is called, interrupts are disabled, 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: Steven Rostedt <srostedt@redhat.com>
  • Loading branch information
Steven Rostedt committed Nov 20, 2008
1 parent ee2f6cc commit 6d07bb4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions arch/powerpc/kernel/idle.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,15 @@ void cpu_idle(void)
smp_mb();
local_irq_disable();

/* Don't trace irqs off for idle */
stop_critical_timings();

/* check again after disabling irqs */
if (!need_resched() && !cpu_should_die())
ppc_md.power_save();

start_critical_timings();

local_irq_enable();
set_thread_flag(TIF_POLLING_NRFLAG);

Expand Down

0 comments on commit 6d07bb4

Please sign in to comment.