diff options
| author | 2023-01-11 10:35:18 +0100 | |
|---|---|---|
| committer | 2023-01-11 18:16:52 -0800 | |
| commit | efe620e5ba03330a71a85b40e68ee1b497c789ed (patch) | |
| tree | 0eb84622040b28542f184f72bd08e0b5ac4d1b91 /scripts/Makefile.thinlto | |
| parent | selftests/xsk: add debug option for creating netdevs (diff) | |
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 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
