summaryrefslogtreecommitdiffstats
path: root/arch/arm64/mm/init.c
diff options
context:
space:
mode:
authorGanapatrao Kulkarni <ganapatrao.kulkarni@caviumnetworks.com>2014-09-16 19:53:54 +0200
committerCatalin Marinas <catalin.marinas@arm.com>2014-09-17 19:14:16 +0200
commita6583c7c8114c4850b57365e85da85e37d5fc568 (patch)
treed1998d46ff5b746c84b997fed3ae39ff584fdd9b /arch/arm64/mm/init.c
parentsetup: Move unmask of async interrupts after possible earlycon setup (diff)
downloadlinux-a6583c7c8114c4850b57365e85da85e37d5fc568.tar.xz
linux-a6583c7c8114c4850b57365e85da85e37d5fc568.zip
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 <will.deacon@arm.com> Signed-off-by: Ganapatrao Kulkarni <ganapatrao.kulkarni@caviumnetworks.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/mm/init.c')
-rw-r--r--arch/arm64/mm/init.c2
1 files changed, 1 insertions, 1 deletions
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();