From 700c2edb736c2537d9dc08ffb002a92e458f62a5 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Wed, 4 Feb 2004 21:20:06 -0800 Subject: [PATCH] [PATCH] ppc64: Fix another numa bug 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 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/ppc64/mm/numa.c b/arch/ppc64/mm/numa.c index cb6f007c5ed4a..4dfd43d4c636b 100644 --- a/arch/ppc64/mm/numa.c +++ b/arch/ppc64/mm/numa.c @@ -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); -- 2.53.0