Merge tag 'gpio-v4.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux...
[cascardo/linux.git] / arch / tile / lib / spinlock_32.c
index 88c2a53..076c6cc 100644 (file)
@@ -76,6 +76,12 @@ void arch_spin_unlock_wait(arch_spinlock_t *lock)
        do {
                delay_backoff(iterations++);
        } while (READ_ONCE(lock->current_ticket) == curr);
+
+       /*
+        * The TILE architecture doesn't do read speculation; therefore
+        * a control dependency guarantees a LOAD->{LOAD,STORE} order.
+        */
+       barrier();
 }
 EXPORT_SYMBOL(arch_spin_unlock_wait);