|
@@ -19,6 +19,7 @@
|
|
#include <linux/notifier.h>
|
|
#include <linux/notifier.h>
|
|
#include <linux/lmb.h>
|
|
#include <linux/lmb.h>
|
|
#include <linux/of.h>
|
|
#include <linux/of.h>
|
|
|
|
+#include <linux/pfn.h>
|
|
#include <asm/sparsemem.h>
|
|
#include <asm/sparsemem.h>
|
|
#include <asm/prom.h>
|
|
#include <asm/prom.h>
|
|
#include <asm/system.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 physbase = lmb.reserved.region[i].base;
|
|
unsigned long size = lmb.reserved.region[i].size;
|
|
unsigned long size = lmb.reserved.region[i].size;
|
|
unsigned long start_pfn = physbase >> PAGE_SHIFT;
|
|
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;
|
|
struct node_active_region node_ar;
|
|
unsigned long node_end_pfn = node->node_start_pfn +
|
|
unsigned long node_end_pfn = node->node_start_pfn +
|
|
node->node_spanned_pages;
|
|
node->node_spanned_pages;
|
|
@@ -908,7 +909,7 @@ static void mark_reserved_regions_for_nid(int nid)
|
|
*/
|
|
*/
|
|
if (end_pfn > node_ar.end_pfn)
|
|
if (end_pfn > node_ar.end_pfn)
|
|
reserve_size = (node_ar.end_pfn << PAGE_SHIFT)
|
|
reserve_size = (node_ar.end_pfn << PAGE_SHIFT)
|
|
- - (start_pfn << PAGE_SHIFT);
|
|
|
|
|
|
+ - physbase;
|
|
/*
|
|
/*
|
|
* Only worry about *this* node, others may not
|
|
* Only worry about *this* node, others may not
|
|
* yet have valid NODE_DATA().
|
|
* yet have valid NODE_DATA().
|