From patchwork Wed Nov 19 21:22:07 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 9636 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id D884CDDFD7 for ; Thu, 20 Nov 2008 08:24:18 +1100 (EST) X-Original-To: linuxppc-dev@ozlabs.org Delivered-To: linuxppc-dev@ozlabs.org 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) Received: from gandalf.stny.rr.com ([74.67.89.75]) by hrndva-omta01.mail.rr.com with ESMTP id <20081119212334.MUQV26071.hrndva-omta01.mail.rr.com@gandalf.stny.rr.com>; Wed, 19 Nov 2008 21:23:34 +0000 Received: from rostedt by gandalf.stny.rr.com with local (Exim 4.69) (envelope-from ) id 1L2uWL-0001mQ-KR; Wed, 19 Nov 2008 16:23:33 -0500 Message-Id: <20081119212333.502626274@goodmis.org> References: <20081119212204.318400312@goodmis.org> User-Agent: quilt/0.46-1 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 Content-Disposition: inline; filename=0003-powerpc-ftrace-do-not-latency-trace-idle.patch Cc: Andrew Morton , Milton Miller , linuxppc-dev@ozlabs.org, Steven Rostedt , Paul Mackerras , Thomas Gleixner , Ingo Molnar X-BeenThere: linuxppc-dev@ozlabs.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org 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);