arm64: kpti: Make use of nG dependent on arm64_kernel_unmapped_at_el0()
authorWill Deacon <will.deacon@arm.com>
Mon, 29 Jan 2018 11:59:53 +0000 (11:59 +0000)
committerHaibo Chen <haibo.chen@nxp.com>
Thu, 12 Apr 2018 10:46:13 +0000 (18:46 +0800)
commitdad607a40fbee58c8414f94c5379a507b1235f95
tree2b197a3a08a47d6e24034788e117c51a2de255bb
parentbd80461a1f3564249e61534bcc3eb71c27d36b58
arm64: kpti: Make use of nG dependent on arm64_kernel_unmapped_at_el0()

commit 41acec624087 upstream.

To allow systems which do not require kpti to continue running with
global kernel mappings (which appears to be a requirement for Cavium
ThunderX due to a CPU erratum), make the use of nG in the kernel page
tables dependent on arm64_kernel_unmapped_at_el0(), which is resolved
at runtime.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Alex Shi <alex.shi@linaro.org>
arch/arm64/include/asm/kernel-pgtable.h
arch/arm64/include/asm/pgtable-prot.h