diff options
author | Will Deacon <will@kernel.org> | 2020-06-30 15:02:22 +0200 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2020-11-09 22:49:34 +0100 |
commit | 364a5a8ae8dc2dd457e2fefb4da3f3fd2c0ba8b1 (patch) | |
tree | 4f905f7e5ebe04d52da859df00aa816827bc1558 /arch/arm64/include/asm/cpucaps.h | |
parent | arm64: alternatives: Split up alternative.h (diff) | |
download | linux-364a5a8ae8dc2dd457e2fefb4da3f3fd2c0ba8b1.tar.xz linux-364a5a8ae8dc2dd457e2fefb4da3f3fd2c0ba8b1.zip |
arm64: cpufeatures: Add capability for LDAPR instruction
Armv8.3 introduced the LDAPR instruction, which provides weaker memory
ordering semantics than LDARi (RCpc vs RCsc). Generally, we provide an
RCsc implementation when implementing the Linux memory model, but LDAPR
can be used as a useful alternative to dependency ordering, particularly
when the compiler is capable of breaking the dependencies.
Since LDAPR is not available on all CPUs, add a cpufeature to detect it at
runtime and allow the instruction to be used with alternative code
patching.
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'arch/arm64/include/asm/cpucaps.h')
-rw-r--r-- | arch/arm64/include/asm/cpucaps.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm64/include/asm/cpucaps.h b/arch/arm64/include/asm/cpucaps.h index e7d98997c09c..64ea0bb9f420 100644 --- a/arch/arm64/include/asm/cpucaps.h +++ b/arch/arm64/include/asm/cpucaps.h @@ -66,7 +66,8 @@ #define ARM64_HAS_TLB_RANGE 56 #define ARM64_MTE 57 #define ARM64_WORKAROUND_1508412 58 +#define ARM64_HAS_LDAPR 59 -#define ARM64_NCAPS 59 +#define ARM64_NCAPS 60 #endif /* __ASM_CPUCAPS_H */ |