diff options
author | Ganapatrao Kulkarni <ganapatrao.kulkarni@caviumnetworks.com> | 2014-09-16 18:53:54 +0100 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2014-09-17 18:14:16 +0100 |
commit | a6583c7c8114c4850b57365e85da85e37d5fc568 (patch) | |
tree | d1998d46ff5b746c84b997fed3ae39ff584fdd9b /arch/arm64/mm | |
parent | 7a9c43bed891d1f8d639c69893ee194f5700d0b2 (diff) |
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')
-rw-r--r-- | arch/arm64/mm/init.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c index 5472c240187..271e654d852 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(); |