Commit a6583c7c authored by Ganapatrao Kulkarni's avatar Ganapatrao Kulkarni Committed by Catalin Marinas

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: default avatarWill Deacon <will.deacon@arm.com>
Signed-off-by: default avatarGanapatrao Kulkarni <ganapatrao.kulkarni@caviumnetworks.com>
Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
parent 7a9c43be
...@@ -256,7 +256,7 @@ static void __init free_unused_memmap(void) ...@@ -256,7 +256,7 @@ static void __init free_unused_memmap(void)
*/ */
void __init mem_init(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 #ifndef CONFIG_SPARSEMEM_VMEMMAP
free_unused_memmap(); free_unused_memmap();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment