linux/scripts/atomic/fallbacks
Mark Rutland d12157efc8 locking/atomic: make atomic*_{cmp,}xchg optional
Most architectures define the atomic/atomic64 xchg and cmpxchg
operations in terms of arch_xchg and arch_cmpxchg respectfully.

Add fallbacks for these cases and remove the trivial cases from arch
code. On some architectures the existing definitions are kept as these
are used to build other arch_atomic*() operations.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20230605070124.3741859-5-mark.rutland@arm.com
2023-06-05 09:57:14 +02:00
..
acquire
add_negative
add_unless
andnot
cmpxchg locking/atomic: make atomic*_{cmp,}xchg optional 2023-06-05 09:57:14 +02:00
dec
dec_and_test
dec_if_positive
dec_unless_positive
fence
fetch_add_unless
inc
inc_and_test
inc_not_zero
inc_unless_negative
read_acquire
release
set_release
sub_and_test
try_cmpxchg
xchg locking/atomic: make atomic*_{cmp,}xchg optional 2023-06-05 09:57:14 +02:00