diff options
Diffstat (limited to 'arch/tile/lib/spinlock_32.c')
-rw-r--r-- | arch/tile/lib/spinlock_32.c | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/arch/tile/lib/spinlock_32.c b/arch/tile/lib/spinlock_32.c index 076c6cc43113..db9333f2447c 100644 --- a/arch/tile/lib/spinlock_32.c +++ b/arch/tile/lib/spinlock_32.c | |||
@@ -62,29 +62,6 @@ int arch_spin_trylock(arch_spinlock_t *lock) | |||
62 | } | 62 | } |
63 | EXPORT_SYMBOL(arch_spin_trylock); | 63 | EXPORT_SYMBOL(arch_spin_trylock); |
64 | 64 | ||
65 | void arch_spin_unlock_wait(arch_spinlock_t *lock) | ||
66 | { | ||
67 | u32 iterations = 0; | ||
68 | int curr = READ_ONCE(lock->current_ticket); | ||
69 | int next = READ_ONCE(lock->next_ticket); | ||
70 | |||
71 | /* Return immediately if unlocked. */ | ||
72 | if (next == curr) | ||
73 | return; | ||
74 | |||
75 | /* Wait until the current locker has released the lock. */ | ||
76 | do { | ||
77 | delay_backoff(iterations++); | ||
78 | } while (READ_ONCE(lock->current_ticket) == curr); | ||
79 | |||
80 | /* | ||
81 | * The TILE architecture doesn't do read speculation; therefore | ||
82 | * a control dependency guarantees a LOAD->{LOAD,STORE} order. | ||
83 | */ | ||
84 | barrier(); | ||
85 | } | ||
86 | EXPORT_SYMBOL(arch_spin_unlock_wait); | ||
87 | |||
88 | /* | 65 | /* |
89 | * The low byte is always reserved to be the marker for a "tns" operation | 66 | * The low byte is always reserved to be the marker for a "tns" operation |
90 | * since the low bit is set to "1" by a tns. The next seven bits are | 67 | * since the low bit is set to "1" by a tns. The next seven bits are |