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>
This commit is contained in:
Chenguang Zhao 2026-08-17 22:07:39 +08:00 committed by Huacai Chen
parent 576412d982
commit 1fec6bbc09

View File

@ -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)
{