From patchwork Wed Nov 26 21:58:26 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 11013 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 A550BDE3BE for ; Thu, 27 Nov 2008 09:08:57 +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.124]) by ozlabs.org (Postfix) with ESMTP id 1B72BDDE1E for ; Thu, 27 Nov 2008 09:04:25 +1100 (EST) Received: from gandalf.stny.rr.com ([74.67.89.75]) by hrndva-omta06.mail.rr.com with ESMTP id <20081126220424.MFLU25475.hrndva-omta06.mail.rr.com@gandalf.stny.rr.com>; Wed, 26 Nov 2008 22:04:24 +0000 Received: from rostedt by gandalf.stny.rr.com with local (Exim 4.69) (envelope-from ) id 1L5SUh-0000g7-RZ; Wed, 26 Nov 2008 17:04:23 -0500 Message-Id: <20081126220423.701125085@goodmis.org> References: <20081126215821.263324391@goodmis.org> User-Agent: quilt/0.46-1 Date: Wed, 26 Nov 2008 16:58:26 -0500 From: Steven Rostedt To: linux-kernel@vger.kernel.org, Paul Mackerras , Milton Miller , Michael Ellerman , Benjamin Herrenschmidt , linuxppc-dev@ozlabs.org Subject: [PATCH 5/5] powerpc/ppc32: static ftrace fixes for PPC32 Content-Disposition: inline; filename=0005-powerpc-ppc32-static-ftrace-fixes-for-PPC32.patch 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 From: Steven Rostedt Impact: fix for PowerPC 32 code There were some early init code that was not safe for static ftrace to boot on my PowerBook. This code must only use relative addressing, and static mcount performs a compare of the ftrace_trace_function pointer, and gets that with an absolute address. In the early init boot up code, this will cause a fault. This patch removes tracing from the files containing the offending functions. Signed-off-by: Steven Rostedt --- arch/powerpc/kernel/Makefile | 1 + arch/powerpc/lib/Makefile | 3 +++ 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile index 92673b4..d17edb4 100644 --- a/arch/powerpc/kernel/Makefile +++ b/arch/powerpc/kernel/Makefile @@ -17,6 +17,7 @@ ifdef CONFIG_FUNCTION_TRACER CFLAGS_REMOVE_cputable.o = -pg -mno-sched-epilog CFLAGS_REMOVE_prom_init.o = -pg -mno-sched-epilog CFLAGS_REMOVE_btext.o = -pg -mno-sched-epilog +CFLAGS_REMOVE_prom.o = -pg -mno-sched-epilog ifdef CONFIG_DYNAMIC_FTRACE # dynamic ftrace setup. diff --git a/arch/powerpc/lib/Makefile b/arch/powerpc/lib/Makefile index d69912c..8db3527 100644 --- a/arch/powerpc/lib/Makefile +++ b/arch/powerpc/lib/Makefile @@ -6,6 +6,9 @@ ifeq ($(CONFIG_PPC64),y) EXTRA_CFLAGS += -mno-minimal-toc endif +CFLAGS_REMOVE_code-patching.o = -pg +CFLAGS_REMOVE_feature-fixups.o = -pg + obj-y := string.o alloc.o \ checksum_$(CONFIG_WORD_SIZE).o obj-$(CONFIG_PPC32) += div64.o copy_32.o crtsavres.o