aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/lib/debuglocks.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc64/lib/debuglocks.c')
-rw-r--r--arch/sparc64/lib/debuglocks.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/sparc64/lib/debuglocks.c b/arch/sparc64/lib/debuglocks.c
index 7f6ccc4114c5..f5f0b5586f01 100644
--- a/arch/sparc64/lib/debuglocks.c
+++ b/arch/sparc64/lib/debuglocks.c
@@ -61,7 +61,7 @@ again:
61 : "=r" (val) 61 : "=r" (val)
62 : "r" (&(lock->lock)) 62 : "r" (&(lock->lock))
63 : "memory"); 63 : "memory");
64 membar("#StoreLoad | #StoreStore"); 64 membar_storeload_storestore();
65 if (val) { 65 if (val) {
66 while (lock->lock) { 66 while (lock->lock) {
67 if (!--stuck) { 67 if (!--stuck) {
@@ -69,7 +69,7 @@ again:
69 show(str, lock, caller); 69 show(str, lock, caller);
70 stuck = INIT_STUCK; 70 stuck = INIT_STUCK;
71 } 71 }
72 membar("#LoadLoad"); 72 rmb();
73 } 73 }
74 goto again; 74 goto again;
75 } 75 }
@@ -90,7 +90,7 @@ int _do_spin_trylock(spinlock_t *lock, unsigned long caller)
90 : "=r" (val) 90 : "=r" (val)
91 : "r" (&(lock->lock)) 91 : "r" (&(lock->lock))
92 : "memory"); 92 : "memory");
93 membar("#StoreLoad | #StoreStore"); 93 membar_storeload_storestore();
94 if (!val) { 94 if (!val) {
95 lock->owner_pc = ((unsigned int)caller); 95 lock->owner_pc = ((unsigned int)caller);
96 lock->owner_cpu = cpu; 96 lock->owner_cpu = cpu;
@@ -107,7 +107,7 @@ void _do_spin_unlock(spinlock_t *lock)
107{ 107{
108 lock->owner_pc = 0; 108 lock->owner_pc = 0;
109 lock->owner_cpu = NO_PROC_ID; 109 lock->owner_cpu = NO_PROC_ID;
110 membar("#StoreStore | #LoadStore"); 110 membar_storestore_loadstore();
111 lock->lock = 0; 111 lock->lock = 0;
112 current->thread.smp_lock_count--; 112 current->thread.smp_lock_count--;
113} 113}
@@ -129,7 +129,7 @@ wlock_again:
129 show_read(str, rw, caller); 129 show_read(str, rw, caller);
130 stuck = INIT_STUCK; 130 stuck = INIT_STUCK;
131 } 131 }
132 membar("#LoadLoad"); 132 rmb();
133 } 133 }
134 /* Try once to increment the counter. */ 134 /* Try once to increment the counter. */
135 __asm__ __volatile__( 135 __asm__ __volatile__(
@@ -142,7 +142,7 @@ wlock_again:
142"2:" : "=r" (val) 142"2:" : "=r" (val)
143 : "0" (&(rw->lock)) 143 : "0" (&(rw->lock))
144 : "g1", "g7", "memory"); 144 : "g1", "g7", "memory");
145 membar("#StoreLoad | #StoreStore"); 145 membar_storeload_storestore();
146 if (val) 146 if (val)
147 goto wlock_again; 147 goto wlock_again;
148 rw->reader_pc[cpu] = ((unsigned int)caller); 148 rw->reader_pc[cpu] = ((unsigned int)caller);
@@ -201,7 +201,7 @@ wlock_again:
201 show_write(str, rw, caller); 201 show_write(str, rw, caller);
202 stuck = INIT_STUCK; 202 stuck = INIT_STUCK;
203 } 203 }
204 membar("#LoadLoad"); 204 rmb();
205 } 205 }
206 206
207 /* Try to acuire the write bit. */ 207 /* Try to acuire the write bit. */
@@ -256,7 +256,7 @@ wlock_again:
256 show_write(str, rw, caller); 256 show_write(str, rw, caller);
257 stuck = INIT_STUCK; 257 stuck = INIT_STUCK;
258 } 258 }
259 membar("#LoadLoad"); 259 rmb();
260 } 260 }
261 goto wlock_again; 261 goto wlock_again;
262 } 262 }