]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerSasha Levin <sasha.levin@oracle.com>
Sun, 5 Jul 2015 14:12:50 +0000 (10:12 -0400)
commite965e3a11b9ef79678a55fcad8a025e98acd2eee
tree77a295c98b705513f56cbcce8be0b1d9144eb640
parentc71c24879ca909b3946988ca79ff2a2ce19e6bf4
ARC: add smp barriers around atomics per Documentation/atomic_ops.txt

[ Upstream commit 2576c28e3f623ed401db7e6197241865328620ef ]

 - 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>
Signed-off-by: Sasha Levin <sasha.levin@oracle.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