OSDN Git Service

arm64: mm: Introduce MAX_USER_VA_BITS definition
authorWill Deacon <will.deacon@arm.com>
Wed, 12 Dec 2018 11:51:40 +0000 (11:51 +0000)
committerWill Deacon <will.deacon@arm.com>
Wed, 12 Dec 2018 11:51:40 +0000 (11:51 +0000)
commit9b31cf493ffa40914e02998381993116e574c651
tree424c97293f7f941af7e3aa207dda3f9e08de0091
parent4d08d20f1c94b2da5847d3f9ba6c93ae5b1520c2
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>
arch/arm64/include/asm/memory.h
arch/arm64/include/asm/pgtable-hwdef.h
arch/arm64/include/asm/processor.h