]> 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)
commitc427b6dbe7aa93a39fb60c4e8b42412e15c70d82
treeb4fa6e8677a195c348b69de6dc1556f607e5a258
parent28530d98537b330178591c54e0e221f5e85f5ce6
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: 6e7d5ea60aa4 ("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