summaryrefslogtreecommitdiff
path: root/lib/string_helpers.c
diff options
context:
space:
mode:
authorDaniel Borkmann <daniel@iogearbox.net>2019-04-26 21:48:22 +0200
committerBruno Martins <bgcngm@gmail.com>2024-01-10 14:16:43 +0000
commitdc34e8e1cf39f64b5dc5a7dee86c45ddc6d31635 (patch)
tree5f7450c526d77af4bac4b7c8316ebd4c1fb28c9d /lib/string_helpers.c
parent5a18785449b692228589667baf6dc290d640dae8 (diff)
bpf, arm64: use more scalable stadd over ldxr / stxr loop in xadd
commit 34b8ab091f9ef57a2bb3c8c8359a0a03a8abf2f9 upstream. Since ARMv8.1 supplement introduced LSE atomic instructions back in 2016, lets add support for STADD and use that in favor of LDXR / STXR loop for the XADD mapping if available. STADD is encoded as an alias for LDADD with XZR as the destination register, therefore add LDADD to the instruction encoder along with STADD as special case and use it in the JIT for CPUs that advertise LSE atomics in CPUID register. If immediate offset in the BPF XADD insn is 0, then use dst register directly instead of temporary one. Change-Id: I77c90fb42f826fab672db94eddc9e16bbba3a65f Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Jean-Philippe Brucker <jean-philippe.brucker@arm.com> Acked-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib/string_helpers.c')
0 files changed, 0 insertions, 0 deletions