Re: [PATCH v3 0/3] LoongArch: BPF: Refine move_imm() and optimize 32-bit operations
From: Tiezhu Yang
Date: Thu Oct 22 2026 - 03:48:01 EST
On 2026/10/16 下午4:10, Tiezhu Yang wrote:
v3:
-- Add a prerequisite patch to detect CPUCFG2_DIV32 feature.
-- Fix a hardware compatibility bug by checking cpu_has_div32
before emitting native 32-bit div/mod instructions.
This version is based on v7.3-rc7 and has been tested on Loongson-3A6000
and Loongson-3A5000 physical machines.
All of the testcases of test_bpf passed on Loongson-3A6000 (with DIV32)
and Loongson-3A5000 (without DIV32), 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 (3):
LoongArch: Add CPUCFG2 DIV32 feature detection
LoongArch: BPF: Clean up and decouple is32 parameter from move_imm()
LoongArch: BPF: Optimize 32-bit operations using native instructions
Hi Huacai, Hengqi,
A gentle ping on the last 2 patches of this series since patch 1
has been applied.
There are no any reports from bot+bpf-ci and sashiko-bot,
and also "test_bpf" and "./test_progs -t jit_insns" tests passed.
Just to clarify the testing status: the 3 failures mentioned in
the previous test report are entirely pre-existing on the clean
bpf-next tree and completely unrelated to this 32-bit optimization
series.
The core ALU32/JMP32 paths introduced here have been fully verified
and passed without any regressions on both 3A6000 and 3A5000 physical
machines.
Do you have any further comments or objections to patches 2 and 3?
If these look good to you, it would be great to have them merged to
avoid rebasing and resending these patches after this merge window.
Thanks,
Tiezhu