From: anton@samba.org

In some cases we can merge reserved regions with the next node.  There was a
bug in the way we calculated the overlapping region which caused us to fail
during boot.



---

 arch/ppc64/mm/numa.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff -puN arch/ppc64/mm/numa.c~ppc64-numaisbust arch/ppc64/mm/numa.c
--- 25/arch/ppc64/mm/numa.c~ppc64-numaisbust	2004-02-04 00:12:40.000000000 -0800
+++ 25-akpm/arch/ppc64/mm/numa.c	2004-02-04 00:12:40.000000000 -0800
@@ -273,8 +273,8 @@ void __init do_init_bootmem(void)
 					physbase = start_paddr;
 				}
 
-				if (size > end_paddr - start_paddr)
-					size = end_paddr - start_paddr;
+				if (size > end_paddr - physbase)
+					size = end_paddr - physbase;
 
 				dbg("free_bootmem %lx %lx\n", physbase, size);
 				free_bootmem_node(NODE_DATA(nid), physbase,
@@ -294,8 +294,8 @@ void __init do_init_bootmem(void)
 					physbase = start_paddr;
 				}
 
-				if (size > end_paddr - start_paddr)
-					size = end_paddr - start_paddr;
+				if (size > end_paddr - physbase)
+					size = end_paddr - physbase;
 
 				dbg("reserve_bootmem %lx %lx\n", physbase,
 				    size);

_