Reserve initrd pages.

David Woodhouse dwmw2 at infradead.org
Sat Oct 16 06:52:42 EST 2004


We don't mark initrd pages as reserved. If we manage to allocate enough
other stuff before using the initrd, we end up eating into the initrd
and we don't boot.

Signed-Off-By: David Woodhouse <dwmw2 at infradead.org>

===== arch/ppc64/kernel/setup.c 1.83 vs edited =====
--- 1.83/arch/ppc64/kernel/setup.c	2004-10-04 20:17:37 +01:00
+++ edited/arch/ppc64/kernel/setup.c	2004-10-15 21:02:33 +01:00
@@ -30,6 +30,7 @@
 #include <linux/notifier.h>
 #include <linux/cpu.h>
 #include <linux/unistd.h>
+#include <linux/bootmem.h>
 #include <asm/io.h>
 #include <asm/prom.h>
 #include <asm/processor.h>
@@ -990,6 +991,9 @@
 
 	/* set up the bootmem stuff with available memory */
 	do_init_bootmem();
+
+	if (initrd_start)
+		reserve_bootmem(__pa(initrd_start), initrd_end-initrd_start);
 
 	/* Select the correct idle loop for the platform. */
 	idle_setup();


-- 
dwmw2




More information about the Linuxppc64-dev mailing list