Mark Rutland
bfc18e389c
atomics/treewide: Rename __atomic_add_unless() => atomic_fetch_add_unless()
...
While __atomic_add_unless() was originally intended as a building-block
for atomic_add_unless(), it's now used in a number of places around the
kernel. It's the only common atomic operation named __atomic*(), rather
than atomic_*(), and for consistency it would be better named
atomic_fetch_add_unless().
This lack of consistency is slightly confusing, and gets in the way of
scripting atomics. Given that, let's clean things up and promote it to
an official part of the atomics API, in the form of
atomic_fetch_add_unless().
This patch converts definitions and invocations over to the new name,
including the instrumented version, using the following script:
----
git grep -w __atomic_add_unless | while read line; do
sed -i '{s/\<__atomic_add_unless\>/atomic_fetch_add_unless/}' "${line%%:*}";
done
git grep -w __arch_atomic_add_unless | while read line; do
sed -i '{s/\<__arch_atomic_add_unless\>/arch_atomic_fetch_add_unless/}' "${line%%:*}";
done
----
Note that we do not have atomic{64,_long}_fetch_add_unless(), which will
be introduced by later patches.
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: 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>
Link: https://lore.kernel.org/lkml/20180621121321.4761-2-mark.rutland@arm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2018-06-21 14:22:32 +02:00
..
bitops
locking/atomics, asm-generic/bitops/lock.h: Rewrite using atomic_fetch_*()
2018-06-21 12:52:12 +02:00
4level-fixup.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
5level-fixup.h
x86/mm: Make PGDIR_SHIFT and PTRS_PER_P4D variable
2018-02-14 13:11:14 +01:00
asm-offsets.h
asm-prototypes.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
atomic-instrumented.h
atomics/treewide: Rename __atomic_add_unless() => atomic_fetch_add_unless()
2018-06-21 14:22:32 +02:00
atomic-long.h
locking/mutex: Optimize __mutex_trylock_fast()
2018-05-04 10:02:39 +02:00
atomic.h
atomics/treewide: Rename __atomic_add_unless() => atomic_fetch_add_unless()
2018-06-21 14:22:32 +02:00
atomic64.h
locking/atomic: Fix atomic_set_release() for 'funny' architectures
2017-08-10 12:28:54 +02:00
audit_change_attr.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
audit_dir_write.h
audit: Avoid build failures on systems without renameat
2018-01-30 19:07:54 -08:00
audit_read.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
audit_signal.h
audit_write.h
audit/stable-4.15 PR 20171113
2017-11-15 13:28:48 -08:00
barrier.h
locking/barriers: Introduce smp_cond_load_relaxed() and atomic_cond_read_relaxed()
2018-04-27 09:48:44 +02:00
bitops.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
bitsperlong.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
bug.h
bug.h: work around GCC PR82365 in BUG()
2018-02-21 15:35:43 -08:00
bugs.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
cache.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
cacheflush.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
checksum.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
cmpxchg-local.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
cmpxchg.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
compat.h
time: Add an asm-generic/compat.h file
2018-04-19 13:28:51 +02:00
current.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
delay.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
device.h
div64.h
A relatively calm cycle for the docs tree again.
2017-11-13 08:25:06 -08:00
dma-contiguous.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
dma-mapping.h
dma-mapping: provide a generic dma-noncoherent implementation
2018-05-19 08:46:12 +02:00
dma.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
early_ioremap.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
emergency-restart.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
error-injection.h
error-injection: Add injectable error types
2018-01-12 17:33:38 -08:00
exec.h
mn10300: Remove the architecture
2018-03-09 23:19:56 +01:00
export.h
export.h: remove code for prefixing symbols with underscore
2018-05-17 22:44:57 +09:00
extable.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
fb.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
fixmap.h
ftrace.h
futex.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
getorder.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
gpio.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
hardirq.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
hugetlb.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
hw_irq.h
ide_iops.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
int-ll64.h
int-ll64.h: define u{8,16,32,64} and s{8,16,32,64} based on uapi header
2018-06-07 17:34:38 -07:00
io.h
asm-generic fixes for v4.17-rc1
2018-04-12 09:15:48 -07:00
ioctl.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
iomap.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
irq.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
irq_regs.h
irq_work.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
irqflags.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
kdebug.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
kmap_types.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
kprobes.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
kvm_para.h
KVM: Introduce paravirtualization hints and KVM_HINTS_DEDICATED
2018-03-06 18:40:44 +01:00
linkage.h
local.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
local64.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
mcs_spinlock.h
memory_model.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
mm-arch-hooks.h
mm_hooks.h
arch, mm: Allow arch_dup_mmap() to fail
2017-12-22 20:13:01 +01:00
mmu.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
mmu_context.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
module.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
msi.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
page.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
param.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
parport.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
pci.h
PCI: remove PCI_DMA_BUS_IS_PHYS
2018-05-07 07:15:41 +02:00
pci_iomap.h
mn10300: Remove the architecture
2018-03-09 23:19:56 +01:00
percpu.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
pgalloc.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
pgtable-nop4d-hack.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
pgtable-nop4d.h
x86/mm: Make PGDIR_SHIFT and PTRS_PER_P4D variable
2018-02-14 13:11:14 +01:00
pgtable-nopmd.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
pgtable-nopud.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
pgtable.h
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next
2018-04-03 14:08:58 -07:00
preempt.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
ptrace.h
qrwlock.h
locking/qrwlock: Prevent slowpath writers getting held up by fastpath
2017-10-25 10:57:25 +02:00
qrwlock_types.h
locking/qrwlock: include asm/byteorder.h as needed
2018-02-06 10:28:58 +01:00
qspinlock.h
locking/spinlocks: Clean up comment and #ifndef for {,queued_}spin_is_locked()
2018-05-15 08:11:15 +02:00
qspinlock_types.h
locking/qspinlock: Merge 'struct __qspinlock' into 'struct qspinlock'
2018-04-27 09:48:45 +02:00
resource.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
rwsem.h
Merge branch 'linus' into locking/core, to resolve conflicts
2017-11-07 10:32:44 +01:00
seccomp.h
sections.h
sections: split dereference_function_descriptor()
2018-01-09 10:45:37 +01:00
segment.h
serial.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
set_memory.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
signal.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
simd.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
sizes.h
spinlock.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
statfs.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
string.h
switch_to.h
mn10300: Remove the architecture
2018-03-09 23:19:56 +01:00
syscall.h
syscalls.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
termios-base.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
termios.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
timex.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
tlb.h
mm: fix MADV_[FREE|DONTNEED] TLB flush miss problem
2017-08-10 15:54:07 -07:00
tlbflush.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
topology.h
include/asm-generic/topology.h: remove unused parent_node() macro
2017-11-17 16:10:05 -08:00
trace_clock.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
uaccess.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
unaligned.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
unistd.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
user.h
vga.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
vmlinux.lds.h
kbuild: Fix asm-generic/vmlinux.lds.h for LD_DEAD_CODE_DATA_ELIMINATION
2018-05-17 22:45:00 +09:00
vtime.h
word-at-a-time.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
xor.h