From: Jiang Liu Date: Wed, 3 Jul 2013 22:04:33 +0000 (-0700) Subject: mm/SH: prepare for killing free_all_bootmem_node() X-Git-Tag: accepted/tizen/common/20141203.182822~1935^2~281 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e3a466b29fc3da335a5a5b695ca6da980d157070;p=platform%2Fkernel%2Flinux-arm64.git 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 Cc: Paul Mundt Cc: Wen Congyang Cc: Tang Chen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c index c9a517c..33890fd 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();