From: Simon Horman <horms@verge.net.au>
To: kexec@lists.infradead.org, linux-kernel@vger.kernel.org,
linux-sh@vger.kernel.org
Cc: Vivek Goyal <vgoyal@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>,
Paul Mundt <lethal@linux-sh.org>
Subject: [patch 2/6] kdump: sh: parse elfcorehdr command line argument
Date: Thu, 31 Jul 2008 11:22:10 +1000 [thread overview]
Message-ID: <20080731012927.266000791@vergenet.net> (raw)
In-Reply-To: <20080731012208.115225969@vergenet.net>
[-- Attachment #1: sh-parse_elfcorehdr.patch --]
[-- Type: text/plain, Size: 1525 bytes --]
A quick cut and paste from other architectures to allow SH
to parse the elfcorehdr command line argument which is required
for both is_kdump_kernel() and vmcore to function.
(the former is as yet unused on SH).
Tested compilation only
Signed-off-by: Simon Horman <horms@verge.net.au>
---
Andrew, Paul Mundt has aggreed to apply this patch
Index: linux-2.6/arch/sh/kernel/setup.c
===================================================================
--- linux-2.6.orig/arch/sh/kernel/setup.c 2008-07-30 09:33:45.000000000 +1000
+++ linux-2.6/arch/sh/kernel/setup.c 2008-07-30 09:37:45.000000000 +1000
@@ -25,6 +25,7 @@
#include <linux/smp.h>
#include <linux/err.h>
#include <linux/debugfs.h>
+#include <linux/crash_dump.h>
#include <asm/uaccess.h>
#include <asm/io.h>
#include <asm/page.h>
@@ -286,6 +287,25 @@ static void __init setup_memory(void)
extern void __init setup_memory(void);
#endif
+/*
+ * Note: elfcorehdr_addr is not just limited to vmcore. It is also used by
+ * is_kdump_kernel() to determine if we are booting after a panic. Hence
+ * ifdef it under CONFIG_CRASH_DUMP and not CONFIG_PROC_VMCORE.
+ */
+#ifdef CONFIG_CRASH_DUMP
+/* elfcorehdr= specifies the location of elf core header
+ * stored by the crashed kernel.
+ */
+static int __init parse_elfcorehdr(char *arg)
+{
+ if (!arg)
+ return -EINVAL;
+ elfcorehdr_addr = memparse(arg, &arg);
+ return 0;
+}
+early_param("elfcorehdr", parse_elfcorehdr);
+#endif
+
void __init setup_arch(char **cmdline_p)
{
enable_mmu();
--
--
Horms
next prev parent reply other threads:[~2008-07-31 1:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-31 1:22 [patch 0/6] is_kdump_kernel() cleanup and related patches Simon Horman
2008-07-31 1:22 ` [patch 1/6] kdump: Make elfcorehdr_addr independent of CONFIG_PROC_VMCORE Simon Horman
2008-07-31 1:22 ` Simon Horman [this message]
2008-07-31 1:22 ` [patch 3/6] kdump: update elfcorehdr documentation to reflect supported architectures Simon Horman
2008-07-31 1:22 ` [patch 4/6] kdump: use is_kdump_kernel() in sba_init() Simon Horman
2008-07-31 1:22 ` [patch 5/6] kdump: add is_vmcore_usable() and vmcore_unusable() Simon Horman
2008-08-06 0:44 ` Simon Horman
2008-07-31 1:22 ` [patch 6/6] kdump: use is_vmcore_usable() and vmcore_unusable() in reserve_elfcorehdr() Simon Horman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080731012927.266000791@vergenet.net \
--to=horms@verge.net.au \
--cc=akpm@linux-foundation.org \
--cc=kexec@lists.infradead.org \
--cc=lethal@linux-sh.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=vgoyal@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®