Thread (27 messages) 27 messages, 4 authors, 2008-04-24

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

flat view
STALE6744d

From: Dale Farnsworth <hidden>
Date: 2007-11-22 15:46:56
Subsystem: linux for powerpc (32-bit and 64-bit), the rest · Maintainers: Madhavan Srinivasan, Linus Torvalds

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 <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help