summaryrefslogtreecommitdiff
path: root/arch/loongarch/net
diff options
context:
space:
mode:
authorChenguang Zhao <zhaochenguang@kylinos.cn>2026-08-17 22:07:39 +0800
committerHuacai Chen <chenhuacai@loongson.cn>2026-08-17 22:07:39 +0800
commit1fec6bbc09e3066a0f39d85741df2a7877c97945 (patch)
treedb4efe16399e7b1483d28f1115f851a45f5d5c0f /arch/loongarch/net
parent576412d98297bd0b3b837c20643ab2e1ba54766f (diff)
LoongArch: BPF: Advertise JIT support for kptr xchg inline
The BPF verifier can lower bpf_kptr_xchg() to BPF_XCHG when the JIT advertises ptr xchg support. With ordered amswap_db.* emission from the previous patch, declare that LoongArch bpf JIT supports this inlining. Acked-by: Hengqi Chen <hengqi.chen@gmail.com> Acked-by: Tiezhu Yang <yangtiezhu@loongson.cn> Tested-by: Tiezhu Yang <yangtiezhu@loongson.cn> Signed-off-by: Chenguang Zhao <zhaochenguang@kylinos.cn> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'arch/loongarch/net')
-rw-r--r--arch/loongarch/net/bpf_jit.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/loongarch/net/bpf_jit.c b/arch/loongarch/net/bpf_jit.c
index e11f9c9dbe1a..d2ce187d1e23 100644
--- a/arch/loongarch/net/bpf_jit.c
+++ b/arch/loongarch/net/bpf_jit.c
@@ -2371,6 +2371,11 @@ bool bpf_jit_supports_fsession(void)
return true;
}
+bool bpf_jit_supports_ptr_xchg(void)
+{
+ return true;
+}
+
/* Indicate the JIT backend supports mixing bpf2bpf and tailcalls. */
bool bpf_jit_supports_subprog_tailcalls(void)
{