From patchwork Tue Jul 13 13:46:09 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Horman X-Patchwork-Id: 58782 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 4B412100A01 for ; Wed, 14 Jul 2010 00:36:36 +1000 (EST) Received: by ozlabs.org (Postfix) id 49EF71007D2; Wed, 14 Jul 2010 00:36:29 +1000 (EST) Delivered-To: linuxppc-dev@ozlabs.org X-Greylist: delayed 2898 seconds by postgrey-1.32 at bilbo; Wed, 14 Jul 2010 00:36:29 EST Received: from smtp.tuxdriver.com (charlotte.tuxdriver.com [70.61.120.58]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 0BA8D1007D1 for ; Wed, 14 Jul 2010 00:36:29 +1000 (EST) Received: from cpe-076-182-075-229.nc.res.rr.com ([76.182.75.229] helo=localhost) by smtp.tuxdriver.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.63) (envelope-from ) id 1OYfpv-0003Fs-RD; Tue, 13 Jul 2010 09:47:54 -0400 Date: Tue, 13 Jul 2010 09:46:09 -0400 From: Neil Horman To: linux-kernel@vger.kernel.org, kexec@lists.infradead.org, vgoyal@redhat.com, hbabu@us.ibm.com, benh@kernel.crashing.org, paulus@samba.org, linuxppc-dev@ozlabs.org Subject: [PATCH] powerpc: Add vmcoreinfo symbols to allow makdumpfile to filter core files properly Message-ID: <20100713134609.GA14514@hmsreliant.think-freely.org> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-08-17) X-Spam-Score: -2.9 (--) X-Spam-Status: No Cc: nhorman@tuxdriver.com 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 Hey all- About 2 years ago now, I sent this patch upstream to allow makedumpfile to properly filter cores on ppc64: http://www.mail-archive.com/kexec@lists.infradead.org/msg02426.html It got acks from the kexec folks so I pulled it into RHEL, but I never checked back here to make sure it ever made it in, which apparently it didn't. It still needs to be included, so I'm reposting it here, making sure to copy all the ppc folks this time. I've retested it on the latest linus kernel and it works fine, allowing makedumpfile to find all the symbols it needs to properly strip a vmcore on ppc64. Neil Signed-off-by: Neil Horman machine_kexec.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) Reviewed-by: WANG Cong diff --git a/arch/powerpc/kernel/machine_kexec.c b/arch/powerpc/kernel/machine_kexec.c index bb3d893..0df7031 100644 --- a/arch/powerpc/kernel/machine_kexec.c +++ b/arch/powerpc/kernel/machine_kexec.c @@ -45,6 +45,18 @@ void machine_kexec_cleanup(struct kimage *image) ppc_md.machine_kexec_cleanup(image); } +void arch_crash_save_vmcoreinfo(void) +{ + +#ifdef CONFIG_NEED_MULTIPLE_NODES + VMCOREINFO_SYMBOL(node_data); + VMCOREINFO_LENGTH(node_data, MAX_NUMNODES); +#endif +#ifndef CONFIG_NEED_MULTIPLE_NODES + VMCOREINFO_SYMBOL(contig_page_data); +#endif +} + /* * Do not allocate memory (or fail in any way) in machine_kexec(). * We are past the point of no return, committed to rebooting now.