Commit 9e556dcc authored by Will Deacon's avatar Will Deacon Committed by Zeng Heng
Browse files

arm64: cpufeatures: Add capability for LDAPR instruction

mainline inclusion
from mainline-v5.11-rc1
commit 364a5a8a
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I7LP2Z

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=364a5a8ae8dc2dd457e2fefb4da3f3fd2c0ba8b1



---------------------------

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: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: default avatarMark Rutland <mark.rutland@arm.com>
Signed-off-by: default avatarWill Deacon <will@kernel.org>

conflict:
	arch/arm64/Kconfig
	arch/arm64/include/asm/cpucaps.h
	arch/arm64/kernel/cpufeature.c
Signed-off-by: default avatarZeng Heng <zengheng4@huawei.com>
parent 9675e654
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment