arm64: mm: Add arm64_kernel_unmapped_at_el0 helper
authorWill Deacon <will.deacon@arm.com>
Tue, 14 Nov 2017 13:58:08 +0000 (13:58 +0000)
committerWill Deacon <will.deacon@arm.com>
Mon, 11 Dec 2017 13:40:41 +0000 (13:40 +0000)
commitfc0e1299da548b32440051f58f08e0c1eb7edd0b
treef902f679c6a7a3ca503052676e28c2358e9478a0
parent0c8ea531b7740754cf374ca8b7510655f569c5e3
arm64: mm: Add arm64_kernel_unmapped_at_el0 helper

In order for code such as TLB invalidation to operate efficiently when
the decision to map the kernel at EL0 is determined at runtime, this
patch introduces a helper function, arm64_kernel_unmapped_at_el0, to
determine whether or not the kernel is mapped whilst running in userspace.

Currently, this just reports the value of CONFIG_UNMAP_KERNEL_AT_EL0,
but will later be hooked up to a fake CPU capability using a static key.

Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Tested-by: Laura Abbott <labbott@redhat.com>
Tested-by: Shanker Donthineni <shankerd@codeaurora.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/include/asm/mmu.h