diff options
Diffstat (limited to 'include/asm-alpha/bitops.h')
-rw-r--r-- | include/asm-alpha/bitops.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/asm-alpha/bitops.h b/include/asm-alpha/bitops.h index ca667d121898..f1bbe6cf0e84 100644 --- a/include/asm-alpha/bitops.h +++ b/include/asm-alpha/bitops.h | |||
@@ -117,6 +117,9 @@ test_and_set_bit(unsigned long nr, volatile void *addr) | |||
117 | int *m = ((int *) addr) + (nr >> 5); | 117 | int *m = ((int *) addr) + (nr >> 5); |
118 | 118 | ||
119 | __asm__ __volatile__( | 119 | __asm__ __volatile__( |
120 | #ifdef CONFIG_SMP | ||
121 | " mb\n" | ||
122 | #endif | ||
120 | "1: ldl_l %0,%4\n" | 123 | "1: ldl_l %0,%4\n" |
121 | " and %0,%3,%2\n" | 124 | " and %0,%3,%2\n" |
122 | " bne %2,2f\n" | 125 | " bne %2,2f\n" |
@@ -158,6 +161,9 @@ test_and_clear_bit(unsigned long nr, volatile void * addr) | |||
158 | int *m = ((int *) addr) + (nr >> 5); | 161 | int *m = ((int *) addr) + (nr >> 5); |
159 | 162 | ||
160 | __asm__ __volatile__( | 163 | __asm__ __volatile__( |
164 | #ifdef CONFIG_SMP | ||
165 | " mb\n" | ||
166 | #endif | ||
161 | "1: ldl_l %0,%4\n" | 167 | "1: ldl_l %0,%4\n" |
162 | " and %0,%3,%2\n" | 168 | " and %0,%3,%2\n" |
163 | " beq %2,2f\n" | 169 | " beq %2,2f\n" |
@@ -199,6 +205,9 @@ test_and_change_bit(unsigned long nr, volatile void * addr) | |||
199 | int *m = ((int *) addr) + (nr >> 5); | 205 | int *m = ((int *) addr) + (nr >> 5); |
200 | 206 | ||
201 | __asm__ __volatile__( | 207 | __asm__ __volatile__( |
208 | #ifdef CONFIG_SMP | ||
209 | " mb\n" | ||
210 | #endif | ||
202 | "1: ldl_l %0,%4\n" | 211 | "1: ldl_l %0,%4\n" |
203 | " and %0,%3,%2\n" | 212 | " and %0,%3,%2\n" |
204 | " xor %0,%3,%0\n" | 213 | " xor %0,%3,%0\n" |