[PATCH] ppc64: numa: Remove redundant and broken overlap check

Michael Ellerman michael at ellerman.id.au
Fri Mar 25 15:52:03 EST 2005


Hi Andrew,

The numa code used to have to handle the fact that memory regions
(as reported by OF) had been coallesced in the lmb struct and so might
overlap node boundaries.

Since Mike's patch went in this doesn't happen anymore, because we iterate
over the memory regions from OF directly. This patch simply removes a
check that catered for the overlapping case, which now "can't happen".

The condition also happens to be broken in the current code, but
in a painless way, so it's as good as removed already.

I've boot tested this on pSeries.

cheers

Signed-off-by: Michael Ellerman <michael at ellerman.id.au>

Index: 2.6.12-rc1-mem-limit/arch/ppc64/mm/numa.c
===================================================================
--- 2.6.12-rc1-mem-limit.orig/arch/ppc64/mm/numa.c	2005-03-25 02:50:21.000000000 +1100
+++ 2.6.12-rc1-mem-limit/arch/ppc64/mm/numa.c	2005-03-25 03:51:40.000000000 +1100
@@ -614,13 +614,8 @@
 			if (numa_domain != nid)
 				continue;
 
-			if (mem_start < end_paddr &&
-			    (mem_start+mem_size) > start_paddr) {
-				/* should be no overlaps ! */
-				dbg("free_bootmem %lx %lx\n", mem_start, mem_size);
-				free_bootmem_node(NODE_DATA(nid), mem_start,
-						  mem_size);
-			}
+			dbg("free_bootmem %lx %lx\n", mem_start, mem_size);
+			free_bootmem_node(NODE_DATA(nid), mem_start, mem_size);
 
 			if (--ranges)		/* process all ranges in cell */
 				goto new_range;



More information about the Linuxppc64-dev mailing list