Skip to content
Commit 344bf332 authored by Muchun Song's avatar Muchun Song Committed by Will Deacon
Browse files

arm64: mm: fix incorrect assignment of 'max_mapnr'



Although we don't actually make use of the 'max_mapnr' global variable,
we do set it to a junk value for !CONFIG_FLATMEM configurations that
leave mem_map uninitialised.

To avoid somebody tripping over this in future, set 'max_mapnr' using
max_pfn, which is calculated directly from the memblock information.

Reviewed-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
Signed-off-by: default avatarMuchun Song <smuchun@gmail.com>
Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
parent 79a3aaa7
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