From: ext-mika.1.westerberg@nokia.com (Mika Westerberg) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 7/8] arm: kdump: add support for elfcorehdr= parameter Date: Wed, 5 May 2010 09:54:19 +0300 [thread overview] Message-ID: <f91641c681cbb84872288bc0cfc3c423c3c6346e.1273041358.git.ext-mika.1.westerberg@nokia.com> (raw) In-Reply-To: <cover.1273041357.git.ext-mika.1.westerberg@nokia.com> This parameter is used by primary kernel to pass address of vmcore header to the dump capture kernel. Signed-off-by: Mika Westerberg <ext-mika.1.westerberg@nokia.com> --- arch/arm/kernel/setup.c | 25 +++++++++++++++++++++++++ 1 files changed, 25 insertions(+), 0 deletions(-) diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 076454f..25a1664 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c @@ -20,6 +20,7 @@ #include <linux/screen_info.h> #include <linux/init.h> #include <linux/kexec.h> +#include <linux/crash_dump.h> #include <linux/root_dev.h> #include <linux/cpu.h> #include <linux/interrupt.h> @@ -711,6 +712,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; -- 1.5.6.5
WARNING: multiple messages have this Message-ID (diff)
From: Mika Westerberg <ext-mika.1.westerberg@nokia.com> To: linux-arm-kernel@lists.infradead.org Cc: kexec@lists.infradead.org, "\\\"Mika Westerberg\\\"" <ext-mika.1.westerberg@nokia.com> Subject: [PATCH v2 7/8] arm: kdump: add support for elfcorehdr= parameter Date: Wed, 5 May 2010 09:54:19 +0300 [thread overview] Message-ID: <f91641c681cbb84872288bc0cfc3c423c3c6346e.1273041358.git.ext-mika.1.westerberg@nokia.com> (raw) In-Reply-To: <cover.1273041357.git.ext-mika.1.westerberg@nokia.com> In-Reply-To: <cover.1273041357.git.ext-mika.1.westerberg@nokia.com> This parameter is used by primary kernel to pass address of vmcore header to the dump capture kernel. Signed-off-by: Mika Westerberg <ext-mika.1.westerberg@nokia.com> --- arch/arm/kernel/setup.c | 25 +++++++++++++++++++++++++ 1 files changed, 25 insertions(+), 0 deletions(-) diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 076454f..25a1664 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c @@ -20,6 +20,7 @@ #include <linux/screen_info.h> #include <linux/init.h> #include <linux/kexec.h> +#include <linux/crash_dump.h> #include <linux/root_dev.h> #include <linux/cpu.h> #include <linux/interrupt.h> @@ -711,6 +712,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; -- 1.5.6.5 _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec
next prev parent reply other threads:[~2010-05-05 6:54 UTC|newest] Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-05-05 6:54 [PATCH v2 0/8] Initial implementation of kdump for ARM Mika Westerberg 2010-05-05 6:54 ` Mika Westerberg 2010-05-05 6:54 ` [PATCH v2 1/8] arm: kdump: reserve memory for crashkernel Mika Westerberg 2010-05-05 6:54 ` Mika Westerberg 2010-05-05 6:54 ` [PATCH v2 2/8] arm: kdump: implement crash_setup_regs() Mika Westerberg 2010-05-05 6:54 ` Mika Westerberg 2010-05-05 6:54 ` [PATCH v2 3/8] arm: kdump: implement machine_crash_shutdown() Mika Westerberg 2010-05-05 6:54 ` Mika Westerberg 2010-05-05 6:54 ` [PATCH v2 4/8] arm: kdump: skip indirection page when crashing Mika Westerberg 2010-05-05 6:54 ` Mika Westerberg 2010-05-05 6:54 ` [PATCH v2 5/8] arm: kdump: implement copy_oldmem_page() Mika Westerberg 2010-05-05 6:54 ` Mika Westerberg 2010-05-05 6:54 ` [PATCH v2 6/8] arm: allow passing an ELF64 header to elf_check_arch() Mika Westerberg 2010-05-05 6:54 ` Mika Westerberg 2010-05-10 11:20 ` Russell King - ARM Linux 2010-05-10 11:20 ` Russell King - ARM Linux 2010-05-10 12:09 ` Mika Westerberg 2010-05-10 12:09 ` Mika Westerberg 2010-05-10 12:21 ` Russell King - ARM Linux 2010-05-10 12:21 ` Russell King - ARM Linux 2010-05-11 7:17 ` Mika Westerberg 2010-05-11 7:17 ` Mika Westerberg 2010-07-16 8:14 ` Mika Westerberg 2010-07-16 8:14 ` Mika Westerberg 2010-08-25 2:40 ` Lei Wen 2010-08-25 2:40 ` Lei Wen 2010-08-25 12:29 ` Mika Westerberg 2010-08-25 12:29 ` Mika Westerberg 2010-05-05 6:54 ` Mika Westerberg [this message] 2010-05-05 6:54 ` [PATCH v2 7/8] arm: kdump: add support for elfcorehdr= parameter Mika Westerberg 2010-05-05 6:54 ` [PATCH v2 8/8] arm: kdump: add CONFIG_CRASH_DUMP Kconfig option Mika Westerberg 2010-05-05 6:54 ` Mika Westerberg 2010-05-25 8:19 ` [PATCH v2 0/8] Initial implementation of kdump for ARM Mika Westerberg 2010-05-25 8:19 ` Mika Westerberg 2010-06-11 6:36 ` Mika Westerberg 2010-07-02 12:48 ` Per Fransson 2010-07-05 8:28 ` Mika Westerberg 2010-07-05 10:01 ` Per Fransson 2010-07-05 10:18 ` Russell King - ARM Linux 2010-07-05 10:34 ` Per Fransson 2010-07-05 11:31 ` Mika Westerberg 2010-07-05 12:04 ` Per Fransson 2010-07-05 13:55 ` Russell King - ARM Linux 2010-07-05 14:05 ` Per Fransson 2010-07-05 14:19 ` Russell King - ARM Linux 2010-07-05 15:37 ` Per Fransson 2010-07-05 16:08 ` Nicolas Pitre 2010-07-05 18:14 ` Russell King - ARM Linux 2010-07-06 8:30 ` Per Fransson 2010-07-07 7:29 ` Mika Westerberg 2010-07-08 8:52 ` Per Fransson 2010-07-12 8:20 ` Mika Westerberg 2010-07-09 3:38 ` Simon Horman 2010-07-09 8:19 ` Per Fransson
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=f91641c681cbb84872288bc0cfc3c423c3c6346e.1273041358.git.ext-mika.1.westerberg@nokia.com \ --to=ext-mika.1.westerberg@nokia.com \ --cc=linux-arm-kernel@lists.infradead.org \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.