ARM: 8637/1: Adjust memory boundaries after reservations
authorLaura Abbott <labbott@redhat.com>
Fri, 13 Jan 2017 21:51:45 +0000 (22:51 +0100)
committerRaspbian kernel package updater <root@raspbian.org>
Sun, 23 Jul 2017 02:56:53 +0000 (02:56 +0000)
commitdf289af0211b4372e4c23b8539c4351cddd8e450
tree746fa491815238160e4ec983221f2bdbd2b8026f
parent162acd0e699aea130b7b7c769971cf2a8e572bbf
ARM: 8637/1: Adjust memory boundaries after reservations

commit 985626564eedc470ce2866e53938303368ad41b7 upstream.

adjust_lowmem_bounds is responsible for setting up the boundary for
lowmem/highmem. This needs to be setup before memblock reservations can
occur. At the time memblock reservations can occur, memory can also be
removed from the system. The lowmem/highmem boundary and end of memory
may be affected by this but it is currently not recalculated. On some
systems this may be harmless, on others this may result in incorrect
ranges being passed to the main memory allocator. Correct this by
recalculating the lowmem/highmem boundary after all reservations have
been made.

Tested-by: Magnus Lilja <lilja.magnus@gmail.com>
Signed-off-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Julien Grall <julien.grall@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm/kernel/setup.c
arch/arm/mm/mmu.c