[PATCH 10/10] powerpc: Make crashkernels ignore crashkernel reservations

Dale Farnsworth dale at farnsworth.org
Fri Nov 23 02:46:54 EST 2007


If a user requests a crash kernel to reserve crashkernel memory,
the kernel fails to boot.  While the user shouldn't do that, it
is easy to check for and makes it possible to use the same command
line for crash kernels as for the initial kernel.

Signed-off-by: Dale Farnsworth <dale at farnsworth.org>
---
 arch/powerpc/kernel/machine_kexec.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/kernel/machine_kexec.c b/arch/powerpc/kernel/machine_kexec.c
index 38c1c1a..733726a 100644
--- a/arch/powerpc/kernel/machine_kexec.c
+++ b/arch/powerpc/kernel/machine_kexec.c
@@ -94,6 +94,14 @@ void __init reserve_crashkernel(void)
 		printk("Crash kernel location must be 0x%x\n",
 				KDUMP_KERNELBASE);
 
+	if (PHYSICAL_START == KDUMP_KERNELBASE) {
+		printk("Already running a crashkernel, "
+			"ignoring crashkernel reservation\n");
+		crashk_res.start = 0;
+		crashk_res.end = 0;
+		return;
+	}
+
 	crashk_res.start = KDUMP_KERNELBASE;
 	crash_size = PAGE_ALIGN(crash_size);
 	crashk_res.end = crashk_res.start + crash_size - 1;
-- 
1.5.3.4




More information about the Linuxppc-dev mailing list