]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: cpufeatures: Add capability for LDAPR instruction
authorWill Deacon <will@kernel.org>
Tue, 30 Jun 2020 13:02:22 +0000 (14:02 +0100)
committerWill Deacon <will@kernel.org>
Mon, 9 Nov 2020 21:49:34 +0000 (21:49 +0000)
commit9d5235f4acd8cb42487b0eef5db79cf53725a8ee
tree4f905f7e5ebe04d52da859df00aa816827bc1558
parent04eb787a0d47e91d696dd12b59b5e8a8285d0fe1
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>
arch/arm64/Kconfig
arch/arm64/include/asm/cpucaps.h
arch/arm64/kernel/cpufeature.c