[PATCH] suggested kexec API changes

Anton Blanchard anton at samba.org
Sun Nov 14 11:17:52 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~dont_reserve_klimit_in_wrapper arch/ppc64/kernel/prom.c
--- foobar2/arch/ppc64/kernel/prom.c~dont_reserve_klimit_in_wrapper	2004-11-13 10:49:17.563463329 +1100
+++ foobar2-anton/arch/ppc64/kernel/prom.c	2004-11-13 10:49:44.965783856 +1100
@@ -1019,6 +1019,7 @@ void __init early_init_devtree(void *par
 
 	/* Scan memory nodes and rebuild LMBs */
 	lmb_init();
+	lmb_reserve(0, __pa(klimit));
 	scan_flat_dt(early_init_dt_scan_root, NULL);
 	scan_flat_dt(early_init_dt_scan_memory, NULL);
 	lmb_analyze();
diff -puN arch/ppc64/kernel/prom_init.c~dont_reserve_klimit_in_wrapper arch/ppc64/kernel/prom_init.c
--- foobar2/arch/ppc64/kernel/prom_init.c~dont_reserve_klimit_in_wrapper	2004-11-13 10:49:17.568462987 +1100
+++ foobar2-anton/arch/ppc64/kernel/prom_init.c	2004-11-13 10:49:17.601460735 +1100
@@ -1603,11 +1603,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~dont_reserve_klimit_in_wrapper include/asm-ppc64/rtas.h
--- foobar2/include/asm-ppc64/rtas.h~dont_reserve_klimit_in_wrapper	2004-11-13 10:49:17.574462578 +1100
+++ foobar2-anton/include/asm-ppc64/rtas.h	2004-11-13 10:49:17.592461349 +1100
@@ -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