locking/atomic, arch/qrwlock: Employ atomic_fetch_add_acquire()
authorPeter Zijlstra <peterz@infradead.org>
Sun, 17 Apr 2016 23:27:03 +0000 (01:27 +0200)
committerIngo Molnar <mingo@kernel.org>
Thu, 16 Jun 2016 08:48:34 +0000 (10:48 +0200)
commitf9852b74bec0117b888da39d070c323ea1cb7f4c
tree7a0414aeaa3fd15a67754f8f87ce511fff8dc0d6
parent4ec45856b698c37e73d973fb4b1a094dfb9d5732
locking/atomic, arch/qrwlock: Employ atomic_fetch_add_acquire()

The only reason for the current code is to make GCC emit only the
"LOCK XADD" instruction on x86 (and not do a pointless extra ADD on
the result), do so nicer.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Waiman Long <waiman.long@hpe.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-arch@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/locking/qrwlock.c