!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: Zheng Zengkai <zhengzengkai@huawei.com> Signed-off-by: Jialin Zhang <zhangjialin11@huawei.com>
Showing
想要评论请 注册 或 登录