linux/arch/mips
Mark Rutland eccc2da8c0 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>
2018-06-21 14:22:33 +02:00
..
alchemy Merge branch 'i2c/for-4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2018-06-14 16:21:46 +09:00
ar7
ath25
ath79
bcm47xx MIPS: BCM47XX: Use __initdata for the bcm47xx_leds_pdata 2018-04-23 16:44:38 +01:00
bcm63xx
bmips treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
boot MIPS changes for 4.18 2018-06-12 12:56:02 -07:00
cavium-octeon swiotlb: move the SWIOTLB config symbol to lib/Kconfig 2018-05-09 06:58:01 +02:00
cobalt
configs MIPS changes for 4.18 2018-06-12 12:56:02 -07:00
crypto
dec MIPS: Convert update_persistent_clock() to update_persistent_clock64() 2018-05-14 23:58:23 +01:00
emma
fw
generic MIPS: xilfpga: Actually include FDT in fitImage 2018-05-14 23:54:25 +01:00
include atomics/treewide: Make atomic_fetch_add_unless() optional 2018-06-21 14:22:33 +02:00
jazz
jz4740 MIPS: JZ4740: Drop old platform reset code 2018-05-14 23:58:23 +01:00
kernel treewide: use PHYS_ADDR_MAX to avoid type casting ULLONG_MAX 2018-06-15 07:55:25 +09:00
kvm Small update for KVM. 2018-06-12 11:34:04 -07:00
lantiq
lasat MIPS: Convert update_persistent_clock() to update_persistent_clock64() 2018-05-14 23:58:23 +01:00
lib MIPS: memset.S: Reinstate delay slot indentation 2018-05-21 16:01:15 +01:00
loongson32
loongson64 MIPS changes for 4.18 2018-06-12 12:56:02 -07:00
math-emu
mm MIPS changes for 4.18 2018-06-12 12:56:02 -07:00
mti-malta MIPS: Convert read_persistent_clock() to read_persistent_clock64() 2018-05-14 23:58:23 +01:00
net bpf, mips: remove unused function 2018-05-14 19:11:45 -07:00
netlogic scatterlist: move the NEED_SG_DMA_LENGTH config symbol to lib/Kconfig 2018-05-09 06:55:59 +02:00
oprofile MIPS: perf: More robustly probe for the presence of per-tc counters 2018-05-15 15:16:16 +01:00
paravirt
pci pci-v4.18-changes 2018-06-07 12:45:58 -07:00
pic32
pistachio
pmcs-msp71xx
pnx833x
power
ralink
rb532
sgi-ip22
sgi-ip27
sgi-ip32
sibyte MIPS changes for 4.18 2018-06-12 12:56:02 -07:00
sni MIPS: sni: Remove the read_persistent_clock() 2018-05-14 23:58:25 +01:00
tools
txx9 treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
vdso
vr41xx
Kbuild
Kbuild.platforms
Kconfig Kbuild: rename HAVE_CC_STACKPROTECTOR config variable 2018-06-15 07:15:28 +09:00
Kconfig.debug
Makefile kbuild: add machine size to CHECKFLAGS 2018-06-01 11:36:58 +09:00
Makefile.postlink