linux/arch/arm64
Mark Rutland 14088540ad arm64: use const cap for system_uses_ttbr0_pan()
Since commit 4b65a5db36 ("arm64: Introduce
uaccess_{disable,enable} functionality based on TTBR0_EL1"),
system_uses_ttbr0_pan() has used cpus_have_cap() to determine whether
PAN is present.

Since commit a4023f6827 ("arm64: Add hypervisor safe helper for
checking constant capabilities"), which was introduced around the same
time, cpus_have_cap() doesn't try to use a static key, and must always
perform a load, test, and consitional branch (likely a tbnz for the
latter two).

Elsewhere, we moved to using cpus_have_const_cap(), which can use a
static key (i.e. a non-conditional branch), which is patched at runtime
when the feature is detected.

This patch makes system_uses_ttbr0_pan() use cpus_have_const_cap(). The
static key is likely a win for hot-paths like the uacccess primitives,
and this makes our usage consistent regardless.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2017-03-10 17:45:16 +00:00
..
boot Merge tag 'juno-fixes-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into next/late 2017-03-02 23:08:31 +01:00
configs ARM: SoC defconfig updates for v4.11 2017-02-23 15:39:32 -08:00
crypto crypto: arm64/aes - add NEON/Crypto Extensions CBCMAC/CMAC/XCBC driver 2017-02-11 17:50:45 +08:00
include arm64: use const cap for system_uses_ttbr0_pan() 2017-03-10 17:45:16 +00:00
kernel arm64: kprobes: remove kprobe_exceptions_notify 2017-03-10 17:41:19 +00:00
kvm 4.11 is going to be a relatively large release for KVM, with a little over 2017-02-22 18:22:53 -08:00
lib scripts/spelling.txt: add "overwritting" pattern and fix typo instances 2017-02-27 18:43:47 -08:00
mm arm64: kasan: avoid bad virt_to_pfn() 2017-03-10 17:41:41 +00:00
net bpf: fix unlocking of jited image when module ronx not set 2017-02-21 13:30:14 -05:00
xen xen/privcmd: Add IOCTL_PRIVCMD_DM_OP 2017-02-14 15:13:43 -05:00
Kconfig arm64: support keyctl() system call in 32-bit mode 2017-03-10 17:43:46 +00:00
Kconfig.debug arm64 updates for 4.11: 2017-02-22 10:46:44 -08:00
Kconfig.platforms arm64: add THUNDER2 processor family 2017-02-09 16:25:26 +01:00
Makefile arm64: Add detection code for broken .inst support in binutils 2016-12-06 15:54:21 +00:00