Two improvements for AArch64 atomics:

Patch 2 reworks the 128-bit compare-exchange in EAL. When the build
does not guarantee LSE (__ARM_FEATURE_ATOMICS / RTE_ARM_FEATURE_ATOMICS
not defined), use the compiler's AArch64 outlined atomic helpers
(__aarch64_cas16_*) so LSE vs LL/SC is selected at runtime from HWCAP,
instead of always falling back to the LL/SC loop. Builds that guarantee
LSE keep the inline CASP implementation; older toolchains without
outlined helpers keep the LL/SC fallback.

Patch 3 makes the BPF arm64 JIT query the ATOMICS CPU flag at runtime
when the build does not guarantee LSE, so JIT-generated code can use
stadd/swpal on capable hardware instead of being limited by build-time
flags.

Tested on an LSE-capable aarch64 VM (Ubuntu 26.04, GCC 15.2) with both
a -Dplatform=generic build (outlined helper path, verified calls to
__aarch64_cas16_* in disassembly) and a -Dplatform=n1sdp build (inline
casp/caspa/caspl/caspal). atomic_autotest, bpf_autotest and
bpf_atomic_imms_autotest pass on both.

Nick Hudson (3):
  mailmap: add new contributor
  eal: select 128-bit CAS by LSE support
  bpf/arm64: detect atomics at build time or runtime

 .mailmap                            |  1 +
 lib/bpf/bpf_jit_arm64.c             | 10 +++++-----
 lib/eal/arm/include/rte_atomic_64.h | 29 +++++++++++++++++++++++++++++
 3 files changed, 35 insertions(+), 5 deletions(-)

-- 
2.54.0 (Apple Git-157)

Reply via email to