linux-kernel-test/include
Bernhard Walle cba63c3089 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>
2007-10-19 11:53:49 -07:00
..
acpi
asm-alpha forbid asm/bitops.h direct inclusion 2007-10-19 11:53:41 -07:00
asm-arm define global BIT macro 2007-10-19 11:53:42 -07:00
asm-arm26 softlockup: make asm/irq_regs.h available on every platform 2007-10-17 08:42:47 -07:00
asm-avr32 forbid asm/bitops.h direct inclusion 2007-10-19 11:53:41 -07:00
asm-blackfin forbid asm/bitops.h direct inclusion 2007-10-19 11:53:41 -07:00
asm-cris forbid asm/bitops.h direct inclusion 2007-10-19 11:53:41 -07:00
asm-frv forbid asm/bitops.h direct inclusion 2007-10-19 11:53:41 -07:00
asm-generic define first set of BIT* macros 2007-10-19 11:53:42 -07:00
asm-h8300 forbid asm/bitops.h direct inclusion 2007-10-19 11:53:41 -07:00
asm-ia64 forbid asm/bitops.h direct inclusion 2007-10-19 11:53:41 -07:00
asm-m32r forbid asm/bitops.h direct inclusion 2007-10-19 11:53:41 -07:00
asm-m68k forbid asm/bitops.h direct inclusion 2007-10-19 11:53:41 -07:00
asm-m68knommu forbid asm/bitops.h direct inclusion 2007-10-19 11:53:41 -07:00
asm-mips define global BIT macro 2007-10-19 11:53:42 -07:00
asm-parisc forbid asm/bitops.h direct inclusion 2007-10-19 11:53:41 -07:00
asm-powerpc forbid asm/bitops.h direct inclusion 2007-10-19 11:53:41 -07:00
asm-ppc remove asm/bitops.h includes 2007-10-19 11:53:41 -07:00
asm-s390 forbid asm/bitops.h direct inclusion 2007-10-19 11:53:41 -07:00
asm-sh forbid asm/bitops.h direct inclusion 2007-10-19 11:53:41 -07:00
asm-sh64 forbid asm/bitops.h direct inclusion 2007-10-19 11:53:41 -07:00
asm-sparc forbid asm/bitops.h direct inclusion 2007-10-19 11:53:41 -07:00
asm-sparc64 forbid asm/bitops.h direct inclusion 2007-10-19 11:53:41 -07:00
asm-um forbid asm/bitops.h direct inclusion 2007-10-19 11:53:41 -07:00
asm-v850 forbid asm/bitops.h direct inclusion 2007-10-19 11:53:41 -07:00
asm-x86 forbid asm/bitops.h direct inclusion 2007-10-19 11:53:41 -07:00
asm-xtensa forbid asm/bitops.h direct inclusion 2007-10-19 11:53:41 -07:00
crypto
keys KEYS: Make request_key() and co fundamentally asynchronous 2007-10-17 08:42:57 -07:00
linux Extended crashkernel command line 2007-10-19 11:53:49 -07:00
math-emu
media
mtd
net Use helpers to obtain task pid in printks 2007-10-19 11:53:43 -07:00
pcmcia pcmcia: use DMA_MASK_NONE for the default for all pcmcia devices 2007-10-16 09:42:50 -07:00
rdma
rxrpc
scsi do not export /usr/include/scsi in make headers_install 2007-10-17 08:42:52 -07:00
sound [ALSA] version 1.0.15 2007-10-16 16:57:46 +02:00
video define global BIT macro 2007-10-19 11:53:42 -07:00
xen xen: fix incorrect vcpu_register_vcpu_info hypercall argument 2007-10-16 11:51:31 -07:00
Kbuild do not export /usr/include/scsi in make headers_install 2007-10-17 08:42:52 -07:00