summaryrefslogtreecommitdiffstats
path: root/arch/sh/mm
diff options
context:
space:
mode:
authorJiang Liu <liuj97@gmail.com>2013-07-04 00:04:33 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-04 01:07:39 +0200
commite3a466b29fc3da335a5a5b695ca6da980d157070 (patch)
tree1bc1f212630d271a9781589343414282c9b70094 /arch/sh/mm
parentmm/PPC: prepare for killing free_all_bootmem_node() (diff)
downloadlinux-e3a466b29fc3da335a5a5b695ca6da980d157070.tar.xz
linux-e3a466b29fc3da335a5a5b695ca6da980d157070.zip
mm/SH: prepare for killing free_all_bootmem_node()
Prepare for killing free_all_bootmem_node() by using free_all_bootmem(). Signed-off-by: Jiang Liu <jiang.liu@huawei.com> Cc: Paul Mundt <lethal@linux-sh.org> Cc: Wen Congyang <wency@cn.fujitsu.com> Cc: Tang Chen <tangchen@cn.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/sh/mm')
-rw-r--r--arch/sh/mm/init.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c
index c9a517c8bbb6..33890fd267cb 100644
--- a/arch/sh/mm/init.c
+++ b/arch/sh/mm/init.c
@@ -412,19 +412,11 @@ void __init mem_init(void)
iommu_init();
high_memory = NULL;
+ for_each_online_pgdat(pgdat)
+ high_memory = max_t(void *, high_memory,
+ __va(pgdat_end_pfn(pgdat) << PAGE_SHIFT));
- for_each_online_pgdat(pgdat) {
- void *node_high_memory;
-
- if (pgdat->node_spanned_pages)
- free_all_bootmem_node(pgdat);
-
- node_high_memory = (void *)__va((pgdat->node_start_pfn +
- pgdat->node_spanned_pages) <<
- PAGE_SHIFT);
- if (node_high_memory > high_memory)
- high_memory = node_high_memory;
- }
+ free_all_bootmem();
/* Set this up early, so we can take care of the zero page */
cpu_cache_init();