diff options
author | Will Deacon <will.deacon@arm.com> | 2018-12-12 14:51:40 +0300 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2018-12-12 14:51:40 +0300 |
commit | 9b31cf493ffa40914e02998381993116e574c651 (patch) | |
tree | 424c97293f7f941af7e3aa207dda3f9e08de0091 /arch/arm64/include/asm/processor.h | |
parent | 4d08d20f1c94b2da5847d3f9ba6c93ae5b1520c2 (diff) | |
download | linux-9b31cf493ffa40914e02998381993116e574c651.tar.xz |
arm64: mm: Introduce MAX_USER_VA_BITS definition
With the introduction of 52-bit virtual addressing for userspace, we are
now in a position where the virtual addressing capability of userspace
may exceed that of the kernel. Consequently, the VA_BITS definition
cannot be used blindly, since it reflects only the size of kernel
virtual addresses.
This patch introduces MAX_USER_VA_BITS which is either VA_BITS or 52
depending on whether 52-bit virtual addressing has been configured at
build time, removing a few places where the 52 is open-coded based on
explicit CONFIG_ guards.
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64/include/asm/processor.h')
-rw-r--r-- | arch/arm64/include/asm/processor.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/arch/arm64/include/asm/processor.h b/arch/arm64/include/asm/processor.h index 538ecbc15067..bbecc6fe3e5b 100644 --- a/arch/arm64/include/asm/processor.h +++ b/arch/arm64/include/asm/processor.h @@ -20,11 +20,7 @@ #define __ASM_PROCESSOR_H #define KERNEL_DS UL(-1) -#ifdef CONFIG_ARM64_USER_VA_BITS_52 -#define USER_DS ((UL(1) << 52) - 1) -#else -#define USER_DS ((UL(1) << VA_BITS) - 1) -#endif /* CONFIG_ARM64_USER_VA_BITS_52 */ +#define USER_DS ((UL(1) << MAX_USER_VA_BITS) - 1) /* * On arm64 systems, unaligned accesses by the CPU are cheap, and so there is |