Skip to content

Commit 67d1b0d

Browse files
mrutland-armPeter Zijlstra
authored andcommitted
locking/atomic: add arch_atomic_long*()
Now that all architectures provide arch_{atomic,atomic64}_*(), we can build arch_atomic_long_*() atop these, which can be safely used in noinstr code. The regular atomic_long_*() wrappers are built atop these, as we do for {atomic,atomic64}_*() atop arch_{atomic,atomic64}_*(). We don't provide arch_* versions of the cond_read*() variants, as we don't have arch_* versions of the underlying atomic/atomic64 functions (nor the smp_cond_load*() helpers these are typically based on). Note that the headers in this patch under include/linux/atomic/ are generated by the scripts in scripts/atomic/. Signed-off-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lore.kernel.org/r/20210713105253.7615-5-mark.rutland@arm.com
1 parent e3d18ce commit 67d1b0d

5 files changed

Lines changed: 916 additions & 333 deletions

File tree

‎include/linux/atomic.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
})
7979

8080
#include <linux/atomic/atomic-arch-fallback.h>
81-
#include <linux/atomic/atomic-instrumented.h>
8281
#include <linux/atomic/atomic-long.h>
82+
#include <linux/atomic/atomic-instrumented.h>
8383

8484
#endif /* _LINUX_ATOMIC_H */

0 commit comments

Comments
 (0)