Unverified Commit 598a1d66 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!1437 arm64: enable lrcpc feature of ARMv8.x from mainline

Merge Pull Request from: @henryze 
 
https://gitee.com/openeuler/kernel/issues/I7LP2Z?from=project-issue

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.


Test steps:
insmod feat_rcpc_001.ko

~~~
[root@localhost zengheng]# insmod feat_rcpc_001.ko
[root@localhost zengheng]# dmesg 
[  489.291575] rcpc test start
[  489.291576] has FEAT_RCPC capability
[  489.291577] FEAT_RCPC read pass
[root@localhost zengheng]# uname -a
Linux localhost 5.10.0+ #13 SMP Wed Jul 26 16:02:44 CST 2023 aarch64 aarch64 aarch64 GNU/Linux
~~~ 
 
Link:https://gitee.com/openeuler/kernel/pulls/1437

 

Reviewed-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
Signed-off-by: default avatarJialin Zhang <zhangjialin11@huawei.com>
parents 6359f4f7 9e556dcc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment