From patchwork Fri Apr 15 09:49:53 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Roese X-Patchwork-Id: 91348 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [IPv6:::1]) by ozlabs.org (Postfix) with ESMTP id 68EAF100ADD for ; Fri, 15 Apr 2011 20:01:22 +1000 (EST) Received: by ozlabs.org (Postfix) id 8BC74B6F59; Fri, 15 Apr 2011 20:01:13 +1000 (EST) Delivered-To: linuxppc-dev@ozlabs.org X-Greylist: delayed 643 seconds by postgrey-1.33 at bilbo; Fri, 15 Apr 2011 20:01:09 EST Received: from mo-p05-ob.rzone.de (mo-p05-ob.rzone.de [81.169.146.181]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 468E71007D1 for ; Fri, 15 Apr 2011 20:01:08 +1000 (EST) X-RZG-AUTH: :IW0NeWC7b/q2i6W/qstXb1SBUuFnrGohdvpEkce+Ub4+ReKfHDOmCJVC6v0HAg== X-RZG-CLASS-ID: mo05 Received: from quad.fritz.box (p57BD4BF7.dip.t-dialin.net [87.189.75.247]) by post.strato.de (klopstock mo22) (RZmta 25.14) with ESMTPA id R01f42n3F8nZhc ; Fri, 15 Apr 2011 11:50:01 +0200 (MEST) From: Stefan Roese To: linuxppc-dev@ozlabs.org Subject: [PATCH] powerpc: Don't write protect kernel text with CONFIG_DYNAMIC_FTRACE enabled Date: Fri, 15 Apr 2011 11:49:53 +0200 Message-Id: <1302860993-28829-1-git-send-email-sr@denx.de> X-Mailer: git-send-email 1.7.4.4 Cc: Steven Rostedt X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org This problem was noticed on an MPC855T platform. Ftrace did oops when trying to write to the kernel text segment. Many thanks to Joakim for finding the root cause of this problem. Signed-off-by: Stefan Roese Cc: Joakim Tjernlund Cc: Benjamin Herrenschmidt Cc: Steven Rostedt --- arch/powerpc/include/asm/pte-common.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/include/asm/pte-common.h b/arch/powerpc/include/asm/pte-common.h index 811f04a..8d1569c 100644 --- a/arch/powerpc/include/asm/pte-common.h +++ b/arch/powerpc/include/asm/pte-common.h @@ -162,7 +162,7 @@ extern unsigned long bad_call_to_PMD_PAGE_SIZE(void); * on platforms where such control is possible. */ #if defined(CONFIG_KGDB) || defined(CONFIG_XMON) || defined(CONFIG_BDI_SWITCH) ||\ - defined(CONFIG_KPROBES) + defined(CONFIG_KPROBES) || defined(CONFIG_DYNAMIC_FTRACE) #define PAGE_KERNEL_TEXT PAGE_KERNEL_X #else #define PAGE_KERNEL_TEXT PAGE_KERNEL_ROX