Reserve initrd pages.

Benjamin Herrenschmidt benh at kernel.crashing.org
Sat Oct 16 10:46:18 EST 2004


On Sat, 2004-10-16 at 06:52, David Woodhouse wrote:
> 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.

Hrm... that should be done in

> 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();
-- 
Benjamin Herrenschmidt <benh at kernel.crashing.org>




More information about the Linuxppc64-dev mailing list