From patchwork Thu Dec 23 02:42:56 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 76470 X-Patchwork-Delegate: benh@kernel.crashing.org Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from bilbo.ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id 4142FB7316 for ; Thu, 23 Dec 2010 13:43:07 +1100 (EST) Received: by ozlabs.org (Postfix) id DE34DB70D5; Thu, 23 Dec 2010 13:43:00 +1100 (EST) Delivered-To: linuxppc-dev@ozlabs.org Received: from hrndva-omtalb.mail.rr.com (hrndva-omtalb.mail.rr.com [71.74.56.123]) by ozlabs.org (Postfix) with ESMTP id 6ACADB70D4 for ; Thu, 23 Dec 2010 13:42:59 +1100 (EST) X-Authority-Analysis: v=1.1 cv=+c36koQ5Dcj/1qolKHjtkYAGXvrVJRRiKMp+84F5sLg= c=1 sm=0 a=Zf2-li83EnIA:10 a=Q9fys5e9bTEA:10 a=OPBmh+XkhLl+Enan7BmTLg==:17 a=VwQbUJbxAAAA:8 a=cIs6I4qDPgwQT4n7TxkA:9 a=utSY0b3mPEPAp6o-YhbHN9HOMXoA:4 a=PUjeQqilurYA:10 a=OPBmh+XkhLl+Enan7BmTLg==:117 X-Cloudmark-Score: 0 X-Originating-IP: 67.242.120.143 Received: from [67.242.120.143] ([67.242.120.143:59031] helo=[192.168.23.10]) by hrndva-oedge03.mail.rr.com (envelope-from ) (ecelerity 2.2.3.46 r()) with ESMTP id E1/31-24070-137B21D4; Thu, 23 Dec 2010 02:42:58 +0000 Subject: Re: Oops in trace_hardirqs_on (powerpc) From: Steven Rostedt To: =?ISO-8859-1?Q?J=F6rg?= Sommer In-Reply-To: <20101219132705.GE6615@alea.gnuu.de> References: <20100806233157.GA7117@alea.gnuu.de> <1285184671.26872.127.camel@gandalf.stny.rr.com> <20100927125037.GA4497@alea.gnuu.de> <1285639094.2989.1.camel@frodo> <20101219132705.GE6615@alea.gnuu.de> Date: Wed, 22 Dec 2010 21:42:56 -0500 Message-ID: <1293072176.22802.6.camel@gandalf.stny.rr.com> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Cc: Frederic Weisbecker , Ingo Molnar , linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org On Sun, 2010-12-19 at 14:27 +0100, Jörg Sommer wrote: > Hi Steven, > > Did you've fixed this problem? The bug report is still marked as open. > https://bugzilla.kernel.org/show_bug.cgi?id=16573 > I just posted a patch to that BZ. I have it here below too. Could you see if it fixes you problem. I only fixed the one place that you reported, it may need more fixes (and in that case a macro to do the work). I hit the same bug on my ppc64 box, and have a fix for that, that I'll post to LKML tomorrow. -- Steve Signed-off-by: Steven Rostedt diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S index ed4aeb9..915cc03 100644 --- a/arch/powerpc/kernel/entry_32.S +++ b/arch/powerpc/kernel/entry_32.S @@ -879,7 +879,18 @@ END_MMU_FTR_SECTION_IFSET(MMU_FTR_TYPE_47x) */ andi. r10,r9,MSR_EE beq 1f + /* + * Since the ftrace irqsoff latency trace checks CALLER_ADDR1, + * which is the stack frame here, we need to force a stack frame + * in case we came from user space. + */ + stwu r1,-32(r1) + mflr r0 + stw r0,4(r1) + stwu r1,-32(r1) bl trace_hardirqs_on + lwz r1,0(r1) + lwz r1,0(r1) lwz r9,_MSR(r1) 1: #endif /* CONFIG_TRACE_IRQFLAGS */