OSDN Git Service

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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 Jul 2015 17:10:12 +0000 (10:10 -0700)
commit373981c510d6be2ab76a9a09bacf458011e9f02b
treeaff11cd3c6ef5cb70c8c4631a75ea6934a82a48b
parent9399c5fc98569732445a83ce0f04b02faabb904c
ARC: add smp barriers around atomics per Documentation/atomic_ops.txt

commit 2576c28e3f623ed401db7e6197241865328620ef upstream.

 - 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>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arc/include/asm/atomic.h
arch/arc/include/asm/bitops.h
arch/arc/include/asm/cmpxchg.h
arch/arc/include/asm/spinlock.h