android_kernel_sony_sdm845/arch/hexagon
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Mark Rutland a03ac1ef27 BACKPORT: atomics/treewide: Make atomic_fetch_add_unless() optional
Several architectures these have a near-identical implementation based
on atomic_read() and atomic_cmpxchg() which we can instead define in
<linux/atomic.h>, so let's do so, using something close to the existing
x86 implementation with try_cmpxchg().

Where an architecture provides its own atomic_fetch_add_unless(), it
must define a preprocessor symbol for it. The instrumented atomics are
updated accordingly.

Note that arch/arc's existing atomic_fetch_add_unless() had redundant
barriers, as these are already present in its atomic_cmpxchg()
implementation.

There should be no functional change as a result of this patch.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Will Deacon <will.deacon@arm.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Palmer Dabbelt <palmer@sifive.com>
Cc: Boqun Feng <boqun.feng@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vineet Gupta <vgupta@synopsys.com>
Link: https://lore.kernel.org/lkml/20180621121321.4761-7-mark.rutland@arm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Sorayukii <sorayukii69@gmail.com>
2026-05-15 17:59:14 +07:00
..
configs Hexagon: Comet platform support 2011-11-01 07:34:21 -07:00
include BACKPORT: atomics/treewide: Make atomic_fetch_add_unless() optional 2026-05-15 17:59:14 +07:00
kernel hexagon: use common DISCARDS macro 2021-07-20 16:21:15 +02:00
lib hexagon: export raw I/O routines for modules 2021-11-26 11:48:42 +01:00
mm treewide: replace obsolete _refok by __ref 2016-08-02 17:31:41 -04:00
Kconfig hexagon: update TODO list 2016-06-07 09:35:16 +02:00
Makefile Hexagon: change arch version config to allow comparisons 2013-04-30 19:40:22 -05:00