diff options
author | Magnus Karlsson <[email protected]> | 2023-01-11 10:35:18 +0100 |
---|---|---|
committer | Alexei Starovoitov <[email protected]> | 2023-01-11 18:16:52 -0800 |
commit | efe620e5ba03330a71a85b40e68ee1b497c789ed (patch) | |
tree | 0eb84622040b28542f184f72bd08e0b5ac4d1b91 /lib/memory-notifier-error-inject.c | |
parent | 703bfd37101310ad5a6be09d5ff38c0e949ee8db (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 <[email protected]>
Acked-by: Maciej Fijalkowski <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'lib/memory-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions