aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXishi Qiu <qiuxishi@huawei.com>2013-11-12 18:07:17 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-11-12 22:09:03 -0500
commit6408068ee6ce9d80d66908a2c01a24ee88afd47d (patch)
tree3df805278c0c6554dd7bf6d97d1e408135cccf6f
parent8bfa3f9a012c4049f3d661f7a772cd9c27a7da99 (diff)
mm: use pgdat_end_pfn() to simplify the code in arch
Use "pgdat_end_pfn()" instead of "pgdat->node_start_pfn + pgdat->node_spanned_pages". Simplify the code, no functional change. Signed-off-by: Xishi Qiu <qiuxishi@huawei.com> Cc: James Hogan <james.hogan@imgtec.com> Cc: "Luck, Tony" <tony.luck@intel.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--arch/ia64/mm/init.c4
-rw-r--r--arch/metag/mm/init.c2
-rw-r--r--arch/powerpc/mm/numa.c3
-rw-r--r--arch/sh/mm/init.c2
4 files changed, 4 insertions, 7 deletions
diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c
index b6f7f43424ec..88504abf5704 100644
--- a/arch/ia64/mm/init.c
+++ b/arch/ia64/mm/init.c
@@ -357,9 +357,7 @@ int vmemmap_find_next_valid_pfn(int node, int i)
357 357
358 end_address = (unsigned long) &vmem_map[pgdat->node_start_pfn + i]; 358 end_address = (unsigned long) &vmem_map[pgdat->node_start_pfn + i];
359 end_address = PAGE_ALIGN(end_address); 359 end_address = PAGE_ALIGN(end_address);
360 360 stop_address = (unsigned long) &vmem_map[pgdat_end_pfn(pgdat)];
361 stop_address = (unsigned long) &vmem_map[
362 pgdat->node_start_pfn + pgdat->node_spanned_pages];
363 361
364 do { 362 do {
365 pgd_t *pgd; 363 pgd_t *pgd;
diff --git a/arch/metag/mm/init.c b/arch/metag/mm/init.c
index 249fff66add3..3cd6288f65c2 100644
--- a/arch/metag/mm/init.c
+++ b/arch/metag/mm/init.c
@@ -148,7 +148,7 @@ static void __init bootmem_init_one_node(unsigned int nid)
148 if (!p->node_spanned_pages) 148 if (!p->node_spanned_pages)
149 return; 149 return;
150 150
151 end_pfn = p->node_start_pfn + p->node_spanned_pages; 151 end_pfn = pgdat_end_pfn(p);
152#ifdef CONFIG_HIGHMEM 152#ifdef CONFIG_HIGHMEM
153 if (end_pfn > max_low_pfn) 153 if (end_pfn > max_low_pfn)
154 end_pfn = max_low_pfn; 154 end_pfn = max_low_pfn;
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index 33d67844062c..078d3e00a616 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -938,8 +938,7 @@ static void __init mark_reserved_regions_for_nid(int nid)
938 unsigned long start_pfn = physbase >> PAGE_SHIFT; 938 unsigned long start_pfn = physbase >> PAGE_SHIFT;
939 unsigned long end_pfn = PFN_UP(physbase + size); 939 unsigned long end_pfn = PFN_UP(physbase + size);
940 struct node_active_region node_ar; 940 struct node_active_region node_ar;
941 unsigned long node_end_pfn = node->node_start_pfn + 941 unsigned long node_end_pfn = pgdat_end_pfn(node);
942 node->node_spanned_pages;
943 942
944 /* 943 /*
945 * Check to make sure that this memblock.reserved area is 944 * Check to make sure that this memblock.reserved area is
diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c
index 33890fd267cb..2d089fe2cba9 100644
--- a/arch/sh/mm/init.c
+++ b/arch/sh/mm/init.c
@@ -231,7 +231,7 @@ static void __init bootmem_init_one_node(unsigned int nid)
231 if (!p->node_spanned_pages) 231 if (!p->node_spanned_pages)
232 return; 232 return;
233 233
234 end_pfn = p->node_start_pfn + p->node_spanned_pages; 234 end_pfn = pgdat_end_pfn(p);
235 235
236 total_pages = bootmem_bootmap_pages(p->node_spanned_pages); 236 total_pages = bootmem_bootmap_pages(p->node_spanned_pages);
237 237