diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-02-17 21:19:25 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-02-17 21:19:25 -0500 |
commit | 82a0a1cc8f94bc59e5919715bc03fc8353fa770d (patch) | |
tree | c25f19a0ae1f7cb75319b585c1d473cfed463f22 /arch/powerpc/mm/numa.c | |
parent | 8d30c14cab30d405a05f2aaceda1e9ad57800f36 (diff) | |
parent | 5955c7a2cfb6a35429adea5dc480002b15ca8cfc (diff) |
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.c | 5 |
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 @@ | |||
19 | #include <linux/notifier.h> | 19 | #include <linux/notifier.h> |
20 | #include <linux/lmb.h> | 20 | #include <linux/lmb.h> |
21 | #include <linux/of.h> | 21 | #include <linux/of.h> |
22 | #include <linux/pfn.h> | ||
22 | #include <asm/sparsemem.h> | 23 | #include <asm/sparsemem.h> |
23 | #include <asm/prom.h> | 24 | #include <asm/prom.h> |
24 | #include <asm/system.h> | 25 | #include <asm/system.h> |
@@ -853,7 +854,7 @@ static void mark_reserved_regions_for_nid(int nid) | |||
853 | unsigned long physbase = lmb.reserved.region[i].base; | 854 | unsigned long physbase = lmb.reserved.region[i].base; |
854 | unsigned long size = lmb.reserved.region[i].size; | 855 | unsigned long size = lmb.reserved.region[i].size; |
855 | unsigned long start_pfn = physbase >> PAGE_SHIFT; | 856 | unsigned long start_pfn = physbase >> PAGE_SHIFT; |
856 | unsigned long end_pfn = ((physbase + size) >> PAGE_SHIFT); | 857 | unsigned long end_pfn = PFN_UP(physbase + size); |
857 | struct node_active_region node_ar; | 858 | struct node_active_region node_ar; |
858 | unsigned long node_end_pfn = node->node_start_pfn + | 859 | unsigned long node_end_pfn = node->node_start_pfn + |
859 | node->node_spanned_pages; | 860 | node->node_spanned_pages; |
@@ -879,7 +880,7 @@ static void mark_reserved_regions_for_nid(int nid) | |||
879 | */ | 880 | */ |
880 | if (end_pfn > node_ar.end_pfn) | 881 | if (end_pfn > node_ar.end_pfn) |
881 | reserve_size = (node_ar.end_pfn << PAGE_SHIFT) | 882 | reserve_size = (node_ar.end_pfn << PAGE_SHIFT) |
882 | - (start_pfn << PAGE_SHIFT); | 883 | - physbase; |
883 | /* | 884 | /* |
884 | * Only worry about *this* node, others may not | 885 | * Only worry about *this* node, others may not |
885 | * yet have valid NODE_DATA(). | 886 | * yet have valid NODE_DATA(). |