alistair23-linux/arch/mips
Peter Zijlstra 47933ad41a arch: Introduce smp_load_acquire(), smp_store_release()
A number of situations currently require the heavyweight smp_mb(),
even though there is no need to order prior stores against later
loads.  Many architectures have much cheaper ways to handle these
situations, but the Linux kernel currently has no portable way
to make use of them.

This commit therefore supplies smp_load_acquire() and
smp_store_release() to remedy this situation.  The new
smp_load_acquire() primitive orders the specified load against
any subsequent reads or writes, while the new smp_store_release()
primitive orders the specifed store against any prior reads or
writes.  These primitives allow array-based circular FIFOs to be
implemented without an smp_mb(), and also allow a theoretical
hole in rcu_assign_pointer() to be closed at no additional
expense on most architectures.

In addition, the RCU experience transitioning from explicit
smp_read_barrier_depends() and smp_wmb() to rcu_dereference()
and rcu_assign_pointer(), respectively resulted in substantial
improvements in readability.  It therefore seems likely that
replacing other explicit barriers with smp_load_acquire() and
smp_store_release() will provide similar benefits.  It appears
that roughly half of the explicit barriers in core kernel code
might be so replaced.

[Changelog by PaulMck]

Reviewed-by: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Acked-by: Will Deacon <will.deacon@arm.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: Michael Ellerman <michael@ellerman.id.au>
Cc: Michael Neuling <mikey@neuling.org>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Victor Kaplansky <VICTORK@il.ibm.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Link: http://lkml.kernel.org/r/20131213150640.908486364@infradead.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2014-01-12 10:37:17 +01:00
..
alchemy MIPS: Panic messages should not end in \n. 2013-10-29 21:24:19 +01:00
ar7
ath79 MIPS: ath79: Remove ar933x_uart_platform.h header 2013-10-29 21:23:49 +01:00
bcm47xx MIPS: BCM47XX: Fix detected clock on Asus WL520GC and WL520GU 2013-10-29 21:24:09 +01:00
bcm63xx MIPS: Cleanup CP0 PRId and CP1 FPIR register access masks 2013-09-18 20:25:19 +02:00
boot MIPS: remove duplicate define 2013-11-06 15:51:19 +01:00
cavium-octeon MIPS: Panic messages should not end in \n. 2013-10-29 21:24:19 +01:00
cobalt MIPS: Cobalt: Move to 8250/16550 serial early printk driver 2013-10-29 21:24:38 +01:00
configs MMC highlights for 3.13: 2013-11-18 14:47:30 -08:00
dec DEC: Whitespace cleanup 2013-10-29 21:24:44 +01:00
emma
fw
include arch: Introduce smp_load_acquire(), smp_store_release() 2014-01-12 10:37:17 +01:00
jazz
jz4740
kernel Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-11-13 15:34:18 +09:00
kvm kvm: Add struct kvm arg to memslot APIs 2013-10-17 15:49:23 +02:00
lantiq DeviceTree updates for 3.13. This is a bit larger pull request than 2013-11-12 16:52:17 +09:00
lasat
lib
loongson
loongson1
math-emu
mm Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2013-11-12 10:20:12 +09:00
mti-malta Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2013-11-08 08:32:58 +09:00
mti-sead3 mips: add explicit includes of prom.h 2013-10-09 20:04:05 -05:00
netlogic DeviceTree updates for 3.13. This is a bit larger pull request than 2013-11-12 16:52:17 +09:00
oprofile MIPS: Optimize current_cpu_type() for better code. 2013-09-17 18:50:53 +02:00
pci DeviceTree updates for 3.13. This is a bit larger pull request than 2013-11-12 16:52:17 +09:00
pmcs-msp71xx
pnx833x
power
ralink DeviceTree updates for 3.13. This is a bit larger pull request than 2013-11-12 16:52:17 +09:00
rb532
sgi-ip22
sgi-ip27
sgi-ip32
sibyte MIPS: Cleanup CP0 PRId and CP1 FPIR register access masks 2013-09-18 20:25:19 +02:00
sni MIPS: Cleanup CP0 PRId and CP1 FPIR register access masks 2013-09-18 20:25:19 +02:00
txx9
vr41xx
Kbuild
Kbuild.platforms MIPS: PowerTV: Remove support code. 2013-10-29 21:25:17 +01:00
Kconfig Kconfig cleanups for v3.13 2013-11-15 14:05:15 -08:00
Kconfig.debug MIPS: Add 8250/16550 serial early printk driver 2013-10-29 21:24:36 +01:00
Makefile MIPS: Kbuild: Do not allow building vmlinuz when !ZBOOT 2013-10-29 21:24:26 +01:00