Subject: Re: incorrect rmo_top handling in prom_init

From: Benjamin Herrenschmidt <[email-masked]>
Date: Fri, 03 Mar 2006 10:35:40 +1100

On Thu, 2006-03-02 at 19:55 +0100, Olaf Hering wrote:
> My iBook1 has 2 memory regions in reg. Depending on how I boot it
> (vmlinux+initrd) or zImage.initrd, it will not boot with current Linus
> tree.
> rmo_top should be 160MB instead of 32MB.

Does that fix it ?

Index: linux-work/arch/powerpc/kernel/prom_init.c
===================================================================
--- linux-work.orig/arch/powerpc/kernel/prom_init.c	2006-03-01 11:48:27.000000000 +1100
+++ linux-work/arch/powerpc/kernel/prom_init.c	2006-03-03 10:34:30.000000000 +1100
@@ -978,7 +978,7 @@
 			if (size == 0)
 				continue;
 			prom_debug("    %x %x\n", base, size);
-			if (base == 0)
+			if (base == 0 && (RELOC(of_platform) & PLATFORM_LPAR))
 				RELOC(rmo_top) = size;
 			if ((base + size) > RELOC(ram_top))
 				RELOC(ram_top) = base + size;