]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
LoongArch: BPF: Support load-acquire and store-release instructions
authorTiezhu Yang <yangtiezhu@loongson.cn>
Wed, 22 Apr 2026 07:45:34 +0000 (15:45 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Wed, 22 Apr 2026 07:45:34 +0000 (15:45 +0800)
commitee823fe7c12f92bac5e5b1ea6dd0ac8b267dd464
tree46a489a51a308b18269302f0c38034ad128cc136
parentfc935c190c7967070506a2795575adc7f9f501ef
LoongArch: BPF: Support load-acquire and store-release instructions

Use the LoongArch common memory access instructions with the barrier
'dbar' to support the BPF load-acquire and store-release instructions.

With this patch, the following testcases passed on LoongArch if the
macro CAN_USE_LOAD_ACQ_STORE_REL is usable in bpf selftests:

  sudo ./test_progs -t verifier_load_acquire
  sudo ./test_progs -t verifier_store_release
  sudo ./test_progs -t verifier_precision/bpf_load_acquire
  sudo ./test_progs -t verifier_precision/bpf_store_release
  sudo ./test_progs -t compute_live_registers/atomic_load_acq_store_rel

Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
arch/loongarch/net/bpf_jit.c