Skip to content

Commit

Permalink
locking/atomic: add arch_atomic_long*()
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Mark Rutland authored and Peter Zijlstra committed Jul 16, 2021
1 parent e3d18ce commit 67d1b0d
Show file tree
Hide file tree
Showing 5 changed files with 916 additions and 333 deletions.
2 changes: 1 addition & 1 deletion include/linux/atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
})

#include <linux/atomic/atomic-arch-fallback.h>
#include <linux/atomic/atomic-instrumented.h>
#include <linux/atomic/atomic-long.h>
#include <linux/atomic/atomic-instrumented.h>

#endif /* _LINUX_ATOMIC_H */
Loading

0 comments on commit 67d1b0d

Please sign in to comment.