arm64: mm: Use non-global mappings for kernel space
authorWill Deacon <will.deacon@arm.com>
Tue, 3 Apr 2018 11:08:57 +0000 (12:08 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 8 Apr 2018 10:12:51 +0000 (12:12 +0200)
commit8e4e9770667fc96e50b2bf69377333b587834fae
tree2e6698eba7359b449a2de7eb6484f717d04fc0b4
parent7e59524527a5ce0cbca047f3ad0fb8f7997713fe
arm64: mm: Use non-global mappings for kernel space

commit e046eb0c9bf2 upstream.

In preparation for unmapping the kernel whilst running in userspace,
make the kernel mappings non-global so we can avoid expensive TLB
invalidation on kernel exit to userspace.

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>
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