]> git.baikalelectronics.ru Git - kernel.git/commit
ARC: add smp barriers around atomics per Documentation/atomic_ops.txt
authorVineet Gupta <vgupta@synopsys.com>
Thu, 20 Nov 2014 10:12:09 +0000 (15:42 +0530)
committerVineet Gupta <vgupta@synopsys.com>
Thu, 25 Jun 2015 00:30:16 +0000 (06:00 +0530)
commite680b74c218b4840626a9a730f401cc4dae42713
tree6bff094ce931e43c18d5887417e07c9defa0af4d
parent812d5a6f172ebb26b8d42d82500f43b70aeca0cf
ARC: add smp barriers around atomics per Documentation/atomic_ops.txt

 - arch_spin_lock/unlock were lacking the ACQUIRE/RELEASE barriers
   Since ARCv2 only provides load/load, store/store and all/all, we need
   the full barrier

 - LLOCK/SCOND based atomics, bitops, cmpxchg, which return modified
   values were lacking the explicit smp barriers.

 - Non LLOCK/SCOND varaints don't need the explicit barriers since that
   is implicity provided by the spin locks used to implement the
   critical section (the spin lock barriers in turn are also fixed in
   this commit as explained above

Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: stable@vger.kernel.org
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
arch/arc/include/asm/atomic.h
arch/arc/include/asm/bitops.h
arch/arc/include/asm/cmpxchg.h
arch/arc/include/asm/spinlock.h