• Doug Berger's avatar
    ARM: 8826/1: mm: initialize pfn limits with find_limits() · 071d184a
    Doug Berger authored
    The max_low_pfn value must be set before sparse_init() is called to
    keep the early memblock allocations and frees balanced for kmemleak
    initialization when sparsemem is enabled.
    
    This commit accomplishes that by replacing the local variables min,
    max_low, and max_high with the global limit variables min_low_pfn,
    max_low_pfn, and max_pfn respectively in bootmem_init(). The global
    variables are initialized directly by find_limits() and used in the
    remainder of the function.
    
    Fixes: 9099daed ("mm: kmemleak: avoid using __va() on addresses that don't have a lowmem mapping")
    Cc: Catalin Marinas <catalin.marinas@arm.com>
    Acked-by: default avatarMike Rapoport <rppt@linux.ibm.com>
    Signed-off-by: default avatarDoug Berger <opendmb@gmail.com>
    Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
    071d184a
init.c 17.1 KB