bianbu-linux-6.6/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 locking/atomic: remove ARCH_ATOMIC remanants 2021-07-16 18:46:44 +02:00
add_negative locking/atomic: remove fallback comments 2023-06-05 09:57:13 +02:00
add_unless locking/atomic: remove fallback comments 2023-06-05 09:57:13 +02:00
andnot locking/atomic: remove ARCH_ATOMIC remanants 2021-07-16 18:46:44 +02:00
cmpxchg locking/atomic: make atomic*_{cmp,}xchg optional 2023-06-05 09:57:14 +02:00
dec locking/atomic: remove ARCH_ATOMIC remanants 2021-07-16 18:46:44 +02:00
dec_and_test locking/atomic: remove fallback comments 2023-06-05 09:57:13 +02:00
dec_if_positive locking/atomic: remove ARCH_ATOMIC remanants 2021-07-16 18:46:44 +02:00
dec_unless_positive locking/atomic: remove ARCH_ATOMIC remanants 2021-07-16 18:46:44 +02:00
fence locking/atomic: remove ARCH_ATOMIC remanants 2021-07-16 18:46:44 +02:00
fetch_add_unless locking/atomic: remove fallback comments 2023-06-05 09:57:13 +02:00
inc locking/atomic: remove ARCH_ATOMIC remanants 2021-07-16 18:46:44 +02:00
inc_and_test locking/atomic: remove fallback comments 2023-06-05 09:57:13 +02:00
inc_not_zero locking/atomic: remove fallback comments 2023-06-05 09:57:13 +02:00
inc_unless_negative locking/atomic: remove ARCH_ATOMIC remanants 2021-07-16 18:46:44 +02:00
read_acquire atomics: Fix atomic64_{read_acquire,set_release} fallbacks 2022-02-11 12:13:56 +01:00
release locking/atomic: remove ARCH_ATOMIC remanants 2021-07-16 18:46:44 +02:00
set_release atomics: Fix atomic64_{read_acquire,set_release} fallbacks 2022-02-11 12:13:56 +01:00
sub_and_test locking/atomic: remove fallback comments 2023-06-05 09:57:13 +02:00
try_cmpxchg locking/atomic: remove ARCH_ATOMIC remanants 2021-07-16 18:46:44 +02:00
xchg locking/atomic: make atomic*_{cmp,}xchg optional 2023-06-05 09:57:14 +02:00