[PATCH v2 0/2] LoongArch: BPF: Refine move_imm() and optimize 32-bit operations

From: Tiezhu Yang

Date: Tue Oct 13 2026 - 10:25:01 EST


This version is based on v7.3-rc7 and has been tested on a Loongson-3A6000
physical machine.

All of the testcases of test_bpf passed, here are the test results:

$ sudo modprobe test_bpf
$ dmesg -t | grep Summary
test_bpf: Summary: 1061 PASSED, 0 FAILED, [1049/1049 JIT'ed]
test_bpf: test_tail_calls: Summary: 10 PASSED, 0 FAILED, [10/10 JIT'ed]
test_bpf: test_skb_segment: Summary: 2 PASSED, 0 FAILED

For the BPF selftests test_verifier and test_progs, there are no any
regressions.

Tiezhu Yang (2):
LoongArch: BPF: Clean up and decouple is32 parameter from move_imm()
LoongArch: BPF: Optimize 32-bit operations using native instructions

arch/loongarch/include/asm/inst.h | 6 +
arch/loongarch/net/bpf_jit.c | 365 ++++++++++++++++--------------
arch/loongarch/net/bpf_jit.h | 25 +-
3 files changed, 208 insertions(+), 188 deletions(-)

--
2.42.0