summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/numa.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-02-18 03:19:25 +0100
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-02-18 03:19:25 +0100
commit82a0a1cc8f94bc59e5919715bc03fc8353fa770d (patch)
treec25f19a0ae1f7cb75319b585c1d473cfed463f22 /arch/powerpc/mm/numa.c
parentpowerpc/mm: Rework I$/D$ coherency (v3) (diff)
parentAdd support for VT6415 PCIE PATA IDE Host Controller (diff)
downloadlinux-82a0a1cc8f94bc59e5919715bc03fc8353fa770d.tar.xz
linux-82a0a1cc8f94bc59e5919715bc03fc8353fa770d.zip
Merge commit 'origin/master' into next
Manual merge of: arch/powerpc/include/asm/pgtable-ppc32.h
Diffstat (limited to 'arch/powerpc/mm/numa.c')
-rw-r--r--arch/powerpc/mm/numa.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index c81e74790a8c..0507faa65478 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -19,6 +19,7 @@
#include <linux/notifier.h>
#include <linux/lmb.h>
#include <linux/of.h>
+#include <linux/pfn.h>
#include <asm/sparsemem.h>
#include <asm/prom.h>
#include <asm/system.h>
@@ -853,7 +854,7 @@ static void mark_reserved_regions_for_nid(int nid)
unsigned long physbase = lmb.reserved.region[i].base;
unsigned long size = lmb.reserved.region[i].size;
unsigned long start_pfn = physbase >> PAGE_SHIFT;
- unsigned long end_pfn = ((physbase + size) >> PAGE_SHIFT);
+ unsigned long end_pfn = PFN_UP(physbase + size);
struct node_active_region node_ar;
unsigned long node_end_pfn = node->node_start_pfn +
node->node_spanned_pages;
@@ -879,7 +880,7 @@ static void mark_reserved_regions_for_nid(int nid)
*/
if (end_pfn > node_ar.end_pfn)
reserve_size = (node_ar.end_pfn << PAGE_SHIFT)
- - (start_pfn << PAGE_SHIFT);
+ - physbase;
/*
* Only worry about *this* node, others may not
* yet have valid NODE_DATA().