smp: Make control dependencies work on Alpha, improve documentation
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Sat, 25 Apr 2015 19:48:29 +0000 (12:48 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Wed, 27 May 2015 19:58:02 +0000 (12:58 -0700)
commit5af4692a75daf08dddc93dbb4cd2a1b3d3b617af
treecd86327aa73bd38e2adbd546c0eeb3c512da1f5d
parent81e701e4376232b2779f52f15e3b7413131bd8e4
smp: Make control dependencies work on Alpha, improve documentation

The current formulation of control dependencies fails on DEC Alpha,
which does not respect dependencies of any kind unless an explicit
memory barrier is provided.  This means that the current fomulation of
control dependencies fails on Alpha.  This commit therefore creates a
READ_ONCE_CTRL() that has the same overhead on non-Alpha systems, but
causes Alpha to produce the needed ordering.  This commit also applies
READ_ONCE_CTRL() to the one known use of control dependencies.

Use of READ_ONCE_CTRL() also has the beneficial effect of adding a bit
of self-documentation to control dependencies.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Documentation/memory-barriers.txt
include/linux/compiler.h
kernel/events/ring_buffer.c