Return-Path: Received: from hrndva-omtalb.mail.rr.com (hrndva-omtalb.mail.rr.com [71.74.56.122]) by ozlabs.org (Postfix) with ESMTP id B2739DDE11 for ; Thu, 20 Nov 2008 08:23:35 +1100 (EST) Message-Id: <20081119212333.502626274@goodmis.org> References: <20081119212204.318400312@goodmis.org> Date: Wed, 19 Nov 2008 16:22:07 -0500 From: Steven Rostedt To: linux-kernel@vger.kernel.org Subject: [PATCH 3/9] powerpc: ftrace, do not latency trace idle Cc: Andrew Morton , Milton Miller , linuxppc-dev@ozlabs.org, Steven Rostedt , Paul Mackerras , Thomas Gleixner , Ingo Molnar List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 --- arch/powerpc/kernel/idle.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/kernel/idle.c b/arch/powerpc/kernel/idle.c index 31982d0..88d9c1d 100644 --- a/arch/powerpc/kernel/idle.c +++ b/arch/powerpc/kernel/idle.c @@ -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); -- 1.5.6.5 --