From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756232Ab1KOPOv (ORCPT ); Tue, 15 Nov 2011 10:14:51 -0500 Received: from e23smtp08.au.ibm.com ([202.81.31.141]:58929 "EHLO e23smtp08.au.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756024Ab1KOPOt (ORCPT ); Tue, 15 Nov 2011 10:14:49 -0500 Subject: [RFC PATCH v5 9/9] fadump: Invalidate the fadump registration during machine shutdown. To: linuxppc-dev , Linux Kernel , Benjamin Herrenschmidt From: Mahesh J Salgaonkar Cc: Amerigo Wang , Kexec-ml , Milton Miller , Haren Myneni , Randy Dunlap , "Eric W. Biederman" , Ananth Narayan , Vivek Goyal , Anton Blanchard Date: Tue, 15 Nov 2011 20:44:37 +0530 Message-ID: <20111115151437.16533.92096.stgit@mars.in.ibm.com> In-Reply-To: <20111115151145.16533.16384.stgit@mars.in.ibm.com> References: <20111115151145.16533.16384.stgit@mars.in.ibm.com> User-Agent: StGit/0.15-1-ged5e-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit x-cbid: 11111505-5140-0000-0000-0000003F4C85 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mahesh Salgaonkar If dump is active during system reboot, shutdown or halt then invalidate the fadump registration as it does not get invalidated automatically. Signed-off-by: Mahesh Salgaonkar --- arch/powerpc/kernel/setup-common.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c index 87d2465..847d638 100644 --- a/arch/powerpc/kernel/setup-common.c +++ b/arch/powerpc/kernel/setup-common.c @@ -110,6 +110,14 @@ EXPORT_SYMBOL(ppc_do_canonicalize_irqs); /* also used by kexec */ void machine_shutdown(void) { +#ifdef CONFIG_FA_DUMP + /* + * if fadump is active, cleanup the fadump registration before we + * shutdown. + */ + fadump_cleanup(); +#endif + if (ppc_md.machine_shutdown) ppc_md.machine_shutdown(); }