From: Ganapatrao Kulkarni Date: Tue, 16 Sep 2014 17:53:54 +0000 (+0100) Subject: arm64:mm: initialize max_mapnr using function set_max_mapnr X-Git-Tag: firefly_0821_release~176^2~3127^2~13 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a6583c7c8114c4850b57365e85da85e37d5fc568;p=firefly-linux-kernel-4.4.55.git arm64:mm: initialize max_mapnr using function set_max_mapnr Initializing max_mapnr using set_max_mapnr() helper function instead of direct reference. Also not adding PHYS_PFN_OFFSET to max_pfn, since it already contains it. Acked-by: Will Deacon Signed-off-by: Ganapatrao Kulkarni Signed-off-by: Catalin Marinas --- diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c index 5472c2401876..271e654d852d 100644 --- a/arch/arm64/mm/init.c +++ b/arch/arm64/mm/init.c @@ -256,7 +256,7 @@ static void __init free_unused_memmap(void) */ void __init mem_init(void) { - max_mapnr = pfn_to_page(max_pfn + PHYS_PFN_OFFSET) - mem_map; + set_max_mapnr(pfn_to_page(max_pfn) - mem_map); #ifndef CONFIG_SPARSEMEM_VMEMMAP free_unused_memmap();