* [patch] kdump: sh: parse elfcorehdr command line argument
@ 2008-07-30 0:29 Simon Horman
2008-07-30 1:13 ` Paul Mundt
0 siblings, 1 reply; 2+ messages in thread
From: Simon Horman @ 2008-07-30 0:29 UTC (permalink / raw)
To: linux-kernel, kexec, linux-sh; +Cc: Vivek Goyal, Paul Mundt
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>
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();
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [patch] kdump: sh: parse elfcorehdr command line argument
2008-07-30 0:29 [patch] kdump: sh: parse elfcorehdr command line argument Simon Horman
@ 2008-07-30 1:13 ` Paul Mundt
0 siblings, 0 replies; 2+ messages in thread
From: Paul Mundt @ 2008-07-30 1:13 UTC (permalink / raw)
To: Simon Horman; +Cc: linux-kernel, kexec, linux-sh, Vivek Goyal
On Wed, Jul 30, 2008 at 10:29:39AM +1000, Simon Horman wrote:
> 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>
>
This was the first thing I was going to do this morning, but you beat me
to it. :-)
Applied, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-07-30 1:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-30 0:29 [patch] kdump: sh: parse elfcorehdr command line argument Simon Horman
2008-07-30 1:13 ` Paul Mundt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox