Skip to contentSkip to conversation

powerpc: Fix zImage decompress location

PATCH New Benjamin Herrenschmidt 1 participant 1 message Oct 5, 2006 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc: Fix zImage decompress location

The zImage wrapper has a "hack" that force the decompression to happen above 20Mb for 64 bits kernels, to work around issues with some firmwares on the field. However, the new wrapper has a bug which makes that hack not work properly. This fixes it.

arch/powerpc/boot/of.c +1 -4
Index: linux-work/arch/powerpc/boot/of.c
===================================================================
@@ -176,12 +176,9 @@ static void *claim(unsigned long virt, u
 static void *of_try_claim(u32 size)
 {
 	unsigned long addr = 0;
-	static u8 first_time = 1;
 
-	if (first_time) {
+	if (claim_base == 0)
 		claim_base = _ALIGN_UP((unsigned long)_end, ONE_MB);
-		first_time = 0;
-	}
 
 	for(; claim_base < RAM_END; claim_base += ONE_MB) {
 #ifdef DEBUG