[PATCH] ppc64: Reserve kernel memory in kernel instead of wrapper

Anton Blanchard anton at samba.org
Fri Nov 19 18:34:34 EST 2004


 
Reserve the kernel memory (0 - klimit) in the kernel instead of the
wrapper. Remove an old comment that incorrectly referred to klimit.

Signed-off-by: Anton Blanchard <anton at samba.org>

diff -puN arch/ppc64/kernel/prom.c~ppc64:reserve_klimit_in_kernel.patch?id=433 arch/ppc64/kernel/prom.c
--- gr_base2/arch/ppc64/kernel/prom.c~ppc64:reserve_klimit_in_kernel.patch?id=433	2004-11-15 16:19:13.046782549 -0600
+++ gr_base2-anton/arch/ppc64/kernel/prom.c	2004-11-15 16:19:19.657739184 -0600
@@ -1023,6 +1023,7 @@ void __init early_init_devtree(void *par
 	scan_flat_dt(early_init_dt_scan_memory, NULL);
 	lmb_analyze();
 	systemcfg->physicalMemorySize = lmb_phys_mem_size();
+	lmb_reserve(0, __pa(klimit));
 
 	DBG("Phys. mem: %lx\n", systemcfg->physicalMemorySize);
 
diff -puN arch/ppc64/kernel/prom_init.c~ppc64:reserve_klimit_in_kernel.patch?id=433 arch/ppc64/kernel/prom_init.c
--- gr_base2/arch/ppc64/kernel/prom_init.c~ppc64:reserve_klimit_in_kernel.patch?id=433	2004-11-15 16:19:13.052781655 -0600
+++ gr_base2-anton/arch/ppc64/kernel/prom_init.c	2004-11-15 16:19:13.074778378 -0600
@@ -1606,11 +1606,6 @@ unsigned long __init prom_init(unsigned 
 	prom_debug("offset=0x%x\n", offset);
 
 	/*
-	 * Reserve kernel in reserve map
-	 */
-	reserve_mem(0, __pa(RELOC(klimit)));
-
-	/*
 	 * Check for an initrd
 	 */
 	prom_check_initrd(r3, r4);
diff -puN include/asm-ppc64/rtas.h~ppc64:reserve_klimit_in_kernel.patch?id=433 include/asm-ppc64/rtas.h
--- gr_base2/include/asm-ppc64/rtas.h~ppc64:reserve_klimit_in_kernel.patch?id=433	2004-11-15 16:19:13.058780761 -0600
+++ gr_base2-anton/include/asm-ppc64/rtas.h	2004-11-15 16:19:13.077777931 -0600
@@ -149,7 +149,7 @@ struct rtas_error_log {
 	unsigned long target:4;			/* Target of failed operation */
 	unsigned long type:8;			/* General event or error*/
 	unsigned long extended_log_length:32;	/* length in bytes */
-	unsigned char buffer[1];		/* allocated by klimit bump */
+	unsigned char buffer[1];
 };
 
 struct flash_block {
_



More information about the Linuxppc64-dev mailing list