arm64: kpti: Make use of nG dependent on arm64_kernel_unmapped_at_el0()
authorWill Deacon <will.deacon@arm.com>
Tue, 3 Apr 2018 11:09:19 +0000 (12:09 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 8 Apr 2018 10:12:55 +0000 (12:12 +0200)
commitfefeffe1973f7a5ee57ad4b593f270747b4c784b
treea4f1a4c13d017c6bf7b4ddf4b0e3e007213e3cb4
parent2adcb1fb389f1e4d650ecbd25b9ecace0fe5d014
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> [v4.9 backport]
Signed-off-by: Mark Rutland <mark.rutland@arm.com> [v4.9 backport]
Tested-by: Will Deacon <will.deacon@arm.com>
Tested-by: Greg Hackmann <ghackmann@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm64/include/asm/kernel-pgtable.h
arch/arm64/include/asm/pgtable-prot.h