diff options
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 7393bd76d698..5ac08b8ab654 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> |
| @@ -882,7 +883,7 @@ static void mark_reserved_regions_for_nid(int nid) | |||
| 882 | unsigned long physbase = lmb.reserved.region[i].base; | 883 | unsigned long physbase = lmb.reserved.region[i].base; |
| 883 | unsigned long size = lmb.reserved.region[i].size; | 884 | unsigned long size = lmb.reserved.region[i].size; |
| 884 | unsigned long start_pfn = physbase >> PAGE_SHIFT; | 885 | unsigned long start_pfn = physbase >> PAGE_SHIFT; |
| 885 | unsigned long end_pfn = ((physbase + size) >> PAGE_SHIFT); | 886 | unsigned long end_pfn = PFN_UP(physbase + size); |
| 886 | struct node_active_region node_ar; | 887 | struct node_active_region node_ar; |
| 887 | unsigned long node_end_pfn = node->node_start_pfn + | 888 | unsigned long node_end_pfn = node->node_start_pfn + |
| 888 | node->node_spanned_pages; | 889 | node->node_spanned_pages; |
| @@ -908,7 +909,7 @@ static void mark_reserved_regions_for_nid(int nid) | |||
| 908 | */ | 909 | */ |
| 909 | if (end_pfn > node_ar.end_pfn) | 910 | if (end_pfn > node_ar.end_pfn) |
| 910 | reserve_size = (node_ar.end_pfn << PAGE_SHIFT) | 911 | reserve_size = (node_ar.end_pfn << PAGE_SHIFT) |
| 911 | - (start_pfn << PAGE_SHIFT); | 912 | - physbase; |
| 912 | /* | 913 | /* |
| 913 | * Only worry about *this* node, others may not | 914 | * Only worry about *this* node, others may not |
| 914 | * yet have valid NODE_DATA(). | 915 | * yet have valid NODE_DATA(). |
