aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/kexec.h
diff options
context:
space:
mode:
authorBernhard Walle <bwalle@suse.de>2007-10-19 02:40:58 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-19 14:53:49 -0400
commitcba63c3089fe57bfafff56239a67ac26bfe027a0 (patch)
treea247f3b0352e29e9da5cc07e840b28b5e27ba2e4 /include/linux/kexec.h
parent283bb7fada7e33a759d8fc9bd7a44532e4ad420e (diff)
Extended crashkernel command line
This patch adds a extended crashkernel syntax that makes the value of reserved system RAM dependent on the system RAM itself: crashkernel=<range1>:<size1>[,<range2>:<size2>,...][@offset] range=start-[end] For example: crashkernel=512M-2G:64M,2G-:128M The motivation comes from distributors that configure their crashkernel command line automatically with some configuration tool (YaST, you know ;)). Of course that tool knows the value of System RAM, but if the user removes RAM, then the system becomes unbootable or at least unusable and error handling is very difficult. This series implements this change for i386, x86_64, ia64, ppc64 and sh. That should be all platforms that support kdump in current mainline. I tested all platforms except sh due to the lack of a sh processor. This patch: This is the generic part of the patch. It adds a parse_crashkernel() function in kernel/kexec.c that is called by the architecture specific code that actually reserves the memory. That function takes the whole command line and looks itself for "crashkernel=" in it. If there are multiple occurrences, then the last one is taken. The advantage is that if you have a bootloader like lilo or elilo which allows you to append a command line parameter but not to remove one (like in GRUB), then you can add another crashkernel value for testing at the boot command line and this one overwrites the command line in the configuration then. Signed-off-by: Bernhard Walle <bwalle@suse.de> Cc: Andi Kleen <ak@suse.de> Cc: "Luck, Tony" <tony.luck@intel.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mundt <lethal@linux-sh.org> Cc: Vivek Goyal <vgoyal@in.ibm.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/kexec.h')
-rw-r--r--include/linux/kexec.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/kexec.h b/include/linux/kexec.h
index ad4b82ce84af..2d9c448d8c52 100644
--- a/include/linux/kexec.h
+++ b/include/linux/kexec.h
@@ -187,6 +187,8 @@ extern u32 vmcoreinfo_note[VMCOREINFO_NOTE_SIZE/4];
187extern size_t vmcoreinfo_size; 187extern size_t vmcoreinfo_size;
188extern size_t vmcoreinfo_max_size; 188extern size_t vmcoreinfo_max_size;
189 189
190int __init parse_crashkernel(char *cmdline, unsigned long long system_ram,
191 unsigned long long *crash_size, unsigned long long *crash_base);
190 192
191#else /* !CONFIG_KEXEC */ 193#else /* !CONFIG_KEXEC */
192struct pt_regs; 194struct pt_regs;