]> www.infradead.org Git - users/jedix/linux-maple.git/commit
arm64: set MAX_MEMBLOCK_ADDR according to linear region size
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Tue, 18 Aug 2015 09:34:42 +0000 (10:34 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Sep 2015 17:25:59 +0000 (19:25 +0200)
commitfe6b3cafd6a0ee59a6bd5b5a0e2fee18ea257328
tree639927f512f80ac6eb6045a3a44c89ea8005fcf7
parent01cb08b46fbcb7572db3cfa41a46b054ec8c2fc9
arm64: set MAX_MEMBLOCK_ADDR according to linear region size

commit 34ba2c4247e5c4b1542b1106e156af324660c4f0 upstream.

The linear region size of a 39-bit VA kernel is only 256 GB, which
may be insufficient to cover all of system RAM, even on platforms
that have much less than 256 GB of memory but which is laid out
very sparsely.

So make sure we clip the memory we will not be able to map before
installing it into the memblock memory table, by setting
MAX_MEMBLOCK_ADDR accordingly.

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Tested-by: Stuart Yoder <stuart.yoder@freescale.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm64/include/asm/memory.h