Mark Rutland 356701329f atomics/treewide: Make atomic64_fetch_add_unless() optional
Architectures with atomic64_fetch_add_unless() provide a preprocessor
symbol if they do so, and all other architectures have trivial C
implementations of atomic64_add_unless() which are near-identical.

Let's unify the trivial definitions of atomic64_fetch_add_unless() in
<linux/atomic.h>, so that we always have both
atomic64_fetch_add_unless() and atomic64_add_unless() with less
boilerplate code.

This means that atomic64_add_unless() is always implemented in core
code, and the instrumented atomics are updated accordingly.

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

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Will Deacon <will.deacon@arm.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Boqun Feng <boqun.feng@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/lkml/20180621121321.4761-15-mark.rutland@arm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2018-06-21 14:25:24 +02:00
..
2018-02-19 10:55:36 +00:00
2018-06-12 16:19:22 -07:00
2018-06-12 12:56:02 -07:00
2016-08-03 08:16:30 +02:00
2018-06-12 12:56:02 -07:00
2017-01-25 02:51:11 +01:00
2018-06-12 11:34:04 -07:00
2018-06-12 12:56:02 -07:00
2018-06-12 12:56:02 -07:00
2018-05-14 19:11:45 -07:00
2018-06-07 12:45:58 -07:00
2018-06-12 12:56:02 -07:00
2017-11-03 09:02:30 -07:00
2018-06-12 16:19:22 -07:00
2017-04-10 11:56:07 +02:00