From: Vineet Gupta Date: Sat, 17 Oct 2015 09:59:59 +0000 (+0530) Subject: ARC: spinlock: Document the EX based spin_unlock X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c2bdac146b4f12d3f0065b865d5d36529c2cbfaa;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git ARC: spinlock: Document the EX based spin_unlock Signed-off-by: Vineet Gupta --- 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)