From ebb573e977757ba198e6be2b6a84556573c01299 Mon Sep 17 00:00:00 2001 From: Mika Westerberg Date: Mon, 10 May 2010 09:29:32 +0100 Subject: [PATCH] --- yaml --- r: 201422 b: refs/heads/master c: cea0bb1bc59b94625e60b69aaa9ad6749d5b57dd h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/arm/kernel/setup.c | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index d3dbf51c12c9..6e220e26c528 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 67742c8168ed66fdd6cb5dc90e06c43cdc5bba07 +refs/heads/master: cea0bb1bc59b94625e60b69aaa9ad6749d5b57dd diff --git a/trunk/arch/arm/kernel/setup.c b/trunk/arch/arm/kernel/setup.c index 714cbaaab3aa..2183bb83ac83 100644 --- a/trunk/arch/arm/kernel/setup.c +++ b/trunk/arch/arm/kernel/setup.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -730,6 +731,30 @@ static void __init reserve_crashkernel(void) static inline void reserve_crashkernel(void) {} #endif /* CONFIG_KEXEC */ +/* + * 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. This option will be passed by kexec loader to the capture kernel. + */ +static int __init setup_elfcorehdr(char *arg) +{ + char *end; + + if (!arg) + return -EINVAL; + + elfcorehdr_addr = memparse(arg, &end); + return end > arg ? 0 : -EINVAL; +} +early_param("elfcorehdr", setup_elfcorehdr); +#endif /* CONFIG_CRASH_DUMP */ + void __init setup_arch(char **cmdline_p) { struct tag *tags = (struct tag *)&init_tags;