summaryrefslogtreecommitdiffstats
path: root/arch/arc
diff options
context:
space:
mode:
authorVineet Gupta <vgupta@synopsys.com>2015-10-17 11:59:59 +0200
committerVineet Gupta <vgupta@synopsys.com>2017-08-29 00:17:36 +0200
commitc2bdac146b4f12d3f0065b865d5d36529c2cbfaa (patch)
treec10a12d9cf0980261bfdb943f4666a031d87374e /arch/arc
parentARC: [plat-eznps] disabled stall counter due to a HW bug (diff)
downloadlinux-c2bdac146b4f12d3f0065b865d5d36529c2cbfaa.tar.xz
linux-c2bdac146b4f12d3f0065b865d5d36529c2cbfaa.zip
ARC: spinlock: Document the EX based spin_unlock
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc')
-rw-r--r--arch/arc/include/asm/spinlock.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/arc/include/asm/spinlock.h b/arch/arc/include/asm/spinlock.h
index 233d5ffe6ec7..968c730ef114 100644
--- a/arch/arc/include/asm/spinlock.h
+++ b/arch/arc/include/asm/spinlock.h
@@ -296,6 +296,12 @@ static inline void arch_spin_unlock(arch_spinlock_t *lock)
*/
smp_mb();
+ /*
+ * EX is not really required here, a simple STore of 0 suffices.
+ * However this causes tasklist livelocks in SystemC based SMP virtual
+ * platforms where the systemc core scheduler uses EX as a cue for
+ * moving to next core. Do a git log of this file for details
+ */
__asm__ __volatile__(
" ex %0, [%1] \n"
: "+r" (val)