From patchwork Fri Jan 7 04:00:36 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Blanchard X-Patchwork-Id: 77849 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 68A41B7F2B for ; Fri, 7 Jan 2011 15:00:50 +1100 (EST) Received: by ozlabs.org (Postfix) id 59B06B71F0; Fri, 7 Jan 2011 15:00:44 +1100 (EST) Delivered-To: linuxppc-dev@ozlabs.org Received: from kryten (ppp121-44-56-164.lns20.syd6.internode.on.net [121.44.56.164]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPSA id 2CFB9B7190; Fri, 7 Jan 2011 15:00:44 +1100 (EST) Date: Fri, 7 Jan 2011 15:00:36 +1100 From: Anton Blanchard To: benh@kernel.crashing.org Subject: [PATCH 8/8] powerpc/kdump: Disable ftrace during kexec Message-ID: <20110107150036.5b21b394@kryten> In-Reply-To: <20110107145255.72cf30ba@kryten> References: <20110107145255.72cf30ba@kryten> X-Mailer: Claws Mail 3.7.6 (GTK+ 2.22.0; i486-pc-linux-gnu) Mime-Version: 1.0 Cc: 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 We should disable ftrace during kexec, some of the tracers are very invasive and we do not want them going off while doing the low level work of swapping one kernel out for another. This mirrors what we do on x86. Even though we cannot return from a kexec on powerpc (since we do not implement CONFIG_KEXEC_JUMP), add the restore code in case we do one day. Signed-off-by: Anton Blanchard Index: powerpc.git/arch/powerpc/kernel/machine_kexec.c =================================================================== --- powerpc.git.orig/arch/powerpc/kernel/machine_kexec.c 2011-01-07 12:51:56.222461754 +1100 +++ powerpc.git/arch/powerpc/kernel/machine_kexec.c 2011-01-07 12:52:02.012644243 +1100 @@ -15,6 +15,7 @@ #include #include #include +#include #include #include @@ -82,8 +83,14 @@ void arch_crash_save_vmcoreinfo(void) */ void machine_kexec(struct kimage *image) { + int save_ftrace_enabled; + + save_ftrace_enabled = __ftrace_enabled_save(); + default_machine_kexec(image); + __ftrace_enabled_restore(save_ftrace_enabled); + /* Fall back to normal restart if we're still alive. */ machine_restart(NULL); for(;;);