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-Url: https://git.stricted.de/?a=commitdiff_plain;h=a6583c7c8114c4850b57365e85da85e37d5fc568;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.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();