summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/xsk_prereqs.sh
diff options
context:
space:
mode:
authorMagnus Karlsson <magnus.karlsson@intel.com>2023-01-11 12:35:18 +0300
committerAlexei Starovoitov <ast@kernel.org>2023-01-12 05:16:52 +0300
commitefe620e5ba03330a71a85b40e68ee1b497c789ed (patch)
tree0eb84622040b28542f184f72bd08e0b5ac4d1b91 /tools/testing/selftests/bpf/xsk_prereqs.sh
parent703bfd37101310ad5a6be09d5ff38c0e949ee8db (diff)
downloadlinux-efe620e5ba03330a71a85b40e68ee1b497c789ed.tar.xz
selftests/xsk: replace asm acquire/release implementations
Replace our own homegrown assembly store/release and load/acquire implementations with the HW agnositic atomic APIs C11 offers. This to make the code more portable, easier to read, and reduce the maintenance burden. The original code used load-acquire and store-release barriers hand-coded in assembly. Since C11, these kind of operations are offered as built-ins in gcc and llvm. The load-acquire operation prevents hoisting of non-atomic memory operations to before this operation and it corresponds to the __ATOMIC_ACQUIRE operation in the built-in atomics. The store-release operation prevents hoisting of non-atomic memory operations to after this operation and it corresponds to the __ATOMIC_RELEASE operation in the built-in atomics. Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com> Acked-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com> Link: https://lore.kernel.org/r/20230111093526.11682-8-magnus.karlsson@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/xsk_prereqs.sh')
0 files changed, 0 insertions, 0 deletions