]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: Support for relocatable kdump kernel
authorMohan Kumar M <mohan@in.ibm.com>
Tue, 21 Oct 2008 17:38:10 +0000 (17:38 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 22 Oct 2008 04:01:22 +0000 (15:01 +1100)
commit504164ea0e91a68da7b7941f4d67f7f206a1408c
tree73eb5ad4eeb7174b8c0ae1904bbe80602c5e295d
parent9c1107a767e2453e60440dbd911bbc8f17bf2b6d
powerpc: Support for relocatable kdump kernel

This adds relocatable kernel support for kdump. With this one can
use the same regular kernel to capture the kdump. A signature (0xfeed1234)
is passed in r6 from panic code to the next kernel through kexec_sequence
and purgatory code. The signature is used to differentiate between
kdump kernel and non-kdump kernels.

The purgatory code compares the signature and sets the __kdump_flag in
head_64.S.  During the boot up, kernel code checks __kdump_flag and if it
is set, the kernel will behave as relocatable kdump kernel. This kernel
will boot at the address where it was loaded by kexec-tools ie. at the
address reserved through crashkernel boot parameter.

CONFIG_CRASH_DUMP depends on CONFIG_RELOCATABLE option to build kdump
kernel as relocatable. So the same kernel can be used as production and
kdump kernel.

This patch incorporates the changes suggested by Paul Mackerras to avoid
GOT use and to avoid two copies of the code.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Mohan Kumar M <mohan@in.ibm.com>
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Documentation/kdump/kdump.txt
arch/powerpc/Kconfig
arch/powerpc/include/asm/kdump.h
arch/powerpc/kernel/crash_dump.c
arch/powerpc/kernel/head_64.S
arch/powerpc/kernel/iommu.c
arch/powerpc/kernel/machine_kexec.c
arch/powerpc/kernel/machine_kexec_64.c
arch/powerpc/kernel/misc_64.S
arch/powerpc/platforms/cell/ras.c
arch/powerpc/platforms/pseries/iommu.c