]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: 8826/1: mm: initialize pfn limits with find_limits()
authorDoug Berger <opendmb@gmail.com>
Tue, 22 Jan 2019 20:05:10 +0000 (21:05 +0100)
committerRussell King <rmk+kernel@armlinux.org.uk>
Fri, 1 Feb 2019 21:44:12 +0000 (21:44 +0000)
commit8a544bdd6e291f6d0fb8b966e67ac733522af6bc
treeb4fa6e8677a195c348b69de6dc1556f607e5a258
parent643e1de6972e882f6620133e61cdf0885c6be5cd
ARM: 8826/1: mm: initialize pfn limits with find_limits()

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: a68ab82500ae ("mm: kmemleak: avoid using __va() on addresses that don't have a lowmem mapping")
Cc: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Mike Rapoport <rppt@linux.ibm.com>
Signed-off-by: Doug Berger <opendmb@gmail.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
arch/arm/mm/init.c