OSDN Git Service

arm64: mm: Introduce VA_BITS_MIN
authorSteve Capper <steve.capper@arm.com>
Wed, 7 Aug 2019 15:55:17 +0000 (16:55 +0100)
committerWill Deacon <will@kernel.org>
Fri, 9 Aug 2019 10:17:16 +0000 (11:17 +0100)
commit90ec95cda91a021d82351c976896a63aa364ebf1
tree6f5295463a65f0cda5e79bd47998ab10df11c0f6
parent99426e5e8c9f11b9de65e7c1200868e8a9ceaa47
arm64: mm: Introduce VA_BITS_MIN

In order to support 52-bit kernel addresses detectable at boot time, the
kernel needs to know the most conservative VA_BITS possible should it
need to fall back to this quantity due to lack of hardware support.

A new compile time constant VA_BITS_MIN is introduced in this patch and
it is employed in the KASAN end address, KASLR, and EFI stub.

For Arm, if 52-bit VA support is unavailable the fallback is to 48-bits.

In other words: VA_BITS_MIN = min (48, VA_BITS)

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Steve Capper <steve.capper@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/include/asm/efi.h
arch/arm64/include/asm/memory.h
arch/arm64/include/asm/processor.h
arch/arm64/kernel/head.S
arch/arm64/kernel/kaslr.c
arch/arm64/mm/kasan_init.c