diff options
author | Simon Horman <horms@verge.net.au> | 2008-07-29 20:29:39 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2008-08-01 15:39:32 -0400 |
commit | daf423db3b6afd90ecdd776dbc32c0b57cc78edb (patch) | |
tree | b042a10e9276c15bdadcc1e2a54ba13d23ce8d5e /arch/sh/kernel/setup.c | |
parent | 623fa579e61f250c1913c70257ef3a753820bb68 (diff) |
kdump: sh: parse elfcorehdr command line argument
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>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/setup.c')
-rw-r--r-- | arch/sh/kernel/setup.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c index 6339d0c95715..a35207655e7b 100644 --- a/arch/sh/kernel/setup.c +++ b/arch/sh/kernel/setup.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/smp.h> | 25 | #include <linux/smp.h> |
26 | #include <linux/err.h> | 26 | #include <linux/err.h> |
27 | #include <linux/debugfs.h> | 27 | #include <linux/debugfs.h> |
28 | #include <linux/crash_dump.h> | ||
28 | #include <asm/uaccess.h> | 29 | #include <asm/uaccess.h> |
29 | #include <asm/io.h> | 30 | #include <asm/io.h> |
30 | #include <asm/page.h> | 31 | #include <asm/page.h> |
@@ -286,6 +287,25 @@ static void __init setup_memory(void) | |||
286 | extern void __init setup_memory(void); | 287 | extern void __init setup_memory(void); |
287 | #endif | 288 | #endif |
288 | 289 | ||
290 | /* | ||
291 | * Note: elfcorehdr_addr is not just limited to vmcore. It is also used by | ||
292 | * is_kdump_kernel() to determine if we are booting after a panic. Hence | ||
293 | * ifdef it under CONFIG_CRASH_DUMP and not CONFIG_PROC_VMCORE. | ||
294 | */ | ||
295 | #ifdef CONFIG_CRASH_DUMP | ||
296 | /* elfcorehdr= specifies the location of elf core header | ||
297 | * stored by the crashed kernel. | ||
298 | */ | ||
299 | static int __init parse_elfcorehdr(char *arg) | ||
300 | { | ||
301 | if (!arg) | ||
302 | return -EINVAL; | ||
303 | elfcorehdr_addr = memparse(arg, &arg); | ||
304 | return 0; | ||
305 | } | ||
306 | early_param("elfcorehdr", parse_elfcorehdr); | ||
307 | #endif | ||
308 | |||
289 | void __init setup_arch(char **cmdline_p) | 309 | void __init setup_arch(char **cmdline_p) |
290 | { | 310 | { |
291 | enable_mmu(); | 311 | enable_mmu(); |