summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/numa.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-02-24 03:49:55 -0800
committerDavid S. Miller <davem@davemloft.net>2009-02-24 03:49:55 -0800
commit467388f29fc9cebfb70e7a187107b6b5d772cb44 (patch)
tree4e6fffa65f38addffc149a5fe88be3d2161eaf6e /arch/powerpc/mm/numa.c
parent028e1415a78733fcd2cba4b4c001826cc37a373e (diff)
parentf7e603ad8f78cd3b59e33fa72707da0cbabdf699 (diff)
downloadkernel-crypto-467388f29fc9cebfb70e7a187107b6b5d772cb44.tar.gz
kernel-crypto-467388f29fc9cebfb70e7a187107b6b5d772cb44.tar.xz
kernel-crypto-467388f29fc9cebfb70e7a187107b6b5d772cb44.zip
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
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 7393bd76d69..5ac08b8ab65 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>
@@ -882,7 +883,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;
@@ -908,7 +909,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().