diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2007-03-16 12:10:36 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2007-03-16 21:03:29 -0400 |
commit | 49edd098e298b1f94748b7eb9c76374eeca7fb93 (patch) | |
tree | db864f207840ac1720706cc3490e57eb6213e00c | |
parent | 46230aa6ea1671690e3e5efa2a961fc0745fe9b5 (diff) |
[MIPS] Lockdep: Fix recursion bug.
trace_hardirqs_off -> atomic_inc -> local_irq_restore -> trace_hardirqs_off
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r-- | include/asm-mips/atomic.h | 40 | ||||
-rw-r--r-- | include/asm-mips/bitops.h | 24 | ||||
-rw-r--r-- | include/asm-mips/system.h | 16 |
3 files changed, 40 insertions, 40 deletions
diff --git a/include/asm-mips/atomic.h b/include/asm-mips/atomic.h index 8578869a8bcf..1ac50b6c47ad 100644 --- a/include/asm-mips/atomic.h +++ b/include/asm-mips/atomic.h | |||
@@ -79,9 +79,9 @@ static __inline__ void atomic_add(int i, atomic_t * v) | |||
79 | } else { | 79 | } else { |
80 | unsigned long flags; | 80 | unsigned long flags; |
81 | 81 | ||
82 | local_irq_save(flags); | 82 | raw_local_irq_save(flags); |
83 | v->counter += i; | 83 | v->counter += i; |
84 | local_irq_restore(flags); | 84 | raw_local_irq_restore(flags); |
85 | } | 85 | } |
86 | } | 86 | } |
87 | 87 | ||
@@ -124,9 +124,9 @@ static __inline__ void atomic_sub(int i, atomic_t * v) | |||
124 | } else { | 124 | } else { |
125 | unsigned long flags; | 125 | unsigned long flags; |
126 | 126 | ||
127 | local_irq_save(flags); | 127 | raw_local_irq_save(flags); |
128 | v->counter -= i; | 128 | v->counter -= i; |
129 | local_irq_restore(flags); | 129 | raw_local_irq_restore(flags); |
130 | } | 130 | } |
131 | } | 131 | } |
132 | 132 | ||
@@ -173,11 +173,11 @@ static __inline__ int atomic_add_return(int i, atomic_t * v) | |||
173 | } else { | 173 | } else { |
174 | unsigned long flags; | 174 | unsigned long flags; |
175 | 175 | ||
176 | local_irq_save(flags); | 176 | raw_local_irq_save(flags); |
177 | result = v->counter; | 177 | result = v->counter; |
178 | result += i; | 178 | result += i; |
179 | v->counter = result; | 179 | v->counter = result; |
180 | local_irq_restore(flags); | 180 | raw_local_irq_restore(flags); |
181 | } | 181 | } |
182 | 182 | ||
183 | smp_mb(); | 183 | smp_mb(); |
@@ -225,11 +225,11 @@ static __inline__ int atomic_sub_return(int i, atomic_t * v) | |||
225 | } else { | 225 | } else { |
226 | unsigned long flags; | 226 | unsigned long flags; |
227 | 227 | ||
228 | local_irq_save(flags); | 228 | raw_local_irq_save(flags); |
229 | result = v->counter; | 229 | result = v->counter; |
230 | result -= i; | 230 | result -= i; |
231 | v->counter = result; | 231 | v->counter = result; |
232 | local_irq_restore(flags); | 232 | raw_local_irq_restore(flags); |
233 | } | 233 | } |
234 | 234 | ||
235 | smp_mb(); | 235 | smp_mb(); |
@@ -293,12 +293,12 @@ static __inline__ int atomic_sub_if_positive(int i, atomic_t * v) | |||
293 | } else { | 293 | } else { |
294 | unsigned long flags; | 294 | unsigned long flags; |
295 | 295 | ||
296 | local_irq_save(flags); | 296 | raw_local_irq_save(flags); |
297 | result = v->counter; | 297 | result = v->counter; |
298 | result -= i; | 298 | result -= i; |
299 | if (result >= 0) | 299 | if (result >= 0) |
300 | v->counter = result; | 300 | v->counter = result; |
301 | local_irq_restore(flags); | 301 | raw_local_irq_restore(flags); |
302 | } | 302 | } |
303 | 303 | ||
304 | smp_mb(); | 304 | smp_mb(); |
@@ -454,9 +454,9 @@ static __inline__ void atomic64_add(long i, atomic64_t * v) | |||
454 | } else { | 454 | } else { |
455 | unsigned long flags; | 455 | unsigned long flags; |
456 | 456 | ||
457 | local_irq_save(flags); | 457 | raw_local_irq_save(flags); |
458 | v->counter += i; | 458 | v->counter += i; |
459 | local_irq_restore(flags); | 459 | raw_local_irq_restore(flags); |
460 | } | 460 | } |
461 | } | 461 | } |
462 | 462 | ||
@@ -499,9 +499,9 @@ static __inline__ void atomic64_sub(long i, atomic64_t * v) | |||
499 | } else { | 499 | } else { |
500 | unsigned long flags; | 500 | unsigned long flags; |
501 | 501 | ||
502 | local_irq_save(flags); | 502 | raw_local_irq_save(flags); |
503 | v->counter -= i; | 503 | v->counter -= i; |
504 | local_irq_restore(flags); | 504 | raw_local_irq_restore(flags); |
505 | } | 505 | } |
506 | } | 506 | } |
507 | 507 | ||
@@ -548,11 +548,11 @@ static __inline__ long atomic64_add_return(long i, atomic64_t * v) | |||
548 | } else { | 548 | } else { |
549 | unsigned long flags; | 549 | unsigned long flags; |
550 | 550 | ||
551 | local_irq_save(flags); | 551 | raw_local_irq_save(flags); |
552 | result = v->counter; | 552 | result = v->counter; |
553 | result += i; | 553 | result += i; |
554 | v->counter = result; | 554 | v->counter = result; |
555 | local_irq_restore(flags); | 555 | raw_local_irq_restore(flags); |
556 | } | 556 | } |
557 | 557 | ||
558 | smp_mb(); | 558 | smp_mb(); |
@@ -600,11 +600,11 @@ static __inline__ long atomic64_sub_return(long i, atomic64_t * v) | |||
600 | } else { | 600 | } else { |
601 | unsigned long flags; | 601 | unsigned long flags; |
602 | 602 | ||
603 | local_irq_save(flags); | 603 | raw_local_irq_save(flags); |
604 | result = v->counter; | 604 | result = v->counter; |
605 | result -= i; | 605 | result -= i; |
606 | v->counter = result; | 606 | v->counter = result; |
607 | local_irq_restore(flags); | 607 | raw_local_irq_restore(flags); |
608 | } | 608 | } |
609 | 609 | ||
610 | smp_mb(); | 610 | smp_mb(); |
@@ -668,12 +668,12 @@ static __inline__ long atomic64_sub_if_positive(long i, atomic64_t * v) | |||
668 | } else { | 668 | } else { |
669 | unsigned long flags; | 669 | unsigned long flags; |
670 | 670 | ||
671 | local_irq_save(flags); | 671 | raw_local_irq_save(flags); |
672 | result = v->counter; | 672 | result = v->counter; |
673 | result -= i; | 673 | result -= i; |
674 | if (result >= 0) | 674 | if (result >= 0) |
675 | v->counter = result; | 675 | v->counter = result; |
676 | local_irq_restore(flags); | 676 | raw_local_irq_restore(flags); |
677 | } | 677 | } |
678 | 678 | ||
679 | smp_mb(); | 679 | smp_mb(); |
diff --git a/include/asm-mips/bitops.h b/include/asm-mips/bitops.h index 8959da245cfb..d995413e11fd 100644 --- a/include/asm-mips/bitops.h +++ b/include/asm-mips/bitops.h | |||
@@ -100,9 +100,9 @@ static inline void set_bit(unsigned long nr, volatile unsigned long *addr) | |||
100 | 100 | ||
101 | a += nr >> SZLONG_LOG; | 101 | a += nr >> SZLONG_LOG; |
102 | mask = 1UL << bit; | 102 | mask = 1UL << bit; |
103 | local_irq_save(flags); | 103 | raw_local_irq_save(flags); |
104 | *a |= mask; | 104 | *a |= mask; |
105 | local_irq_restore(flags); | 105 | raw_local_irq_restore(flags); |
106 | } | 106 | } |
107 | } | 107 | } |
108 | 108 | ||
@@ -165,9 +165,9 @@ static inline void clear_bit(unsigned long nr, volatile unsigned long *addr) | |||
165 | 165 | ||
166 | a += nr >> SZLONG_LOG; | 166 | a += nr >> SZLONG_LOG; |
167 | mask = 1UL << bit; | 167 | mask = 1UL << bit; |
168 | local_irq_save(flags); | 168 | raw_local_irq_save(flags); |
169 | *a &= ~mask; | 169 | *a &= ~mask; |
170 | local_irq_restore(flags); | 170 | raw_local_irq_restore(flags); |
171 | } | 171 | } |
172 | } | 172 | } |
173 | 173 | ||
@@ -220,9 +220,9 @@ static inline void change_bit(unsigned long nr, volatile unsigned long *addr) | |||
220 | 220 | ||
221 | a += nr >> SZLONG_LOG; | 221 | a += nr >> SZLONG_LOG; |
222 | mask = 1UL << bit; | 222 | mask = 1UL << bit; |
223 | local_irq_save(flags); | 223 | raw_local_irq_save(flags); |
224 | *a ^= mask; | 224 | *a ^= mask; |
225 | local_irq_restore(flags); | 225 | raw_local_irq_restore(flags); |
226 | } | 226 | } |
227 | } | 227 | } |
228 | 228 | ||
@@ -287,10 +287,10 @@ static inline int test_and_set_bit(unsigned long nr, | |||
287 | 287 | ||
288 | a += nr >> SZLONG_LOG; | 288 | a += nr >> SZLONG_LOG; |
289 | mask = 1UL << bit; | 289 | mask = 1UL << bit; |
290 | local_irq_save(flags); | 290 | raw_local_irq_save(flags); |
291 | retval = (mask & *a) != 0; | 291 | retval = (mask & *a) != 0; |
292 | *a |= mask; | 292 | *a |= mask; |
293 | local_irq_restore(flags); | 293 | raw_local_irq_restore(flags); |
294 | 294 | ||
295 | return retval; | 295 | return retval; |
296 | } | 296 | } |
@@ -381,10 +381,10 @@ static inline int test_and_clear_bit(unsigned long nr, | |||
381 | 381 | ||
382 | a += nr >> SZLONG_LOG; | 382 | a += nr >> SZLONG_LOG; |
383 | mask = 1UL << bit; | 383 | mask = 1UL << bit; |
384 | local_irq_save(flags); | 384 | raw_local_irq_save(flags); |
385 | retval = (mask & *a) != 0; | 385 | retval = (mask & *a) != 0; |
386 | *a &= ~mask; | 386 | *a &= ~mask; |
387 | local_irq_restore(flags); | 387 | raw_local_irq_restore(flags); |
388 | 388 | ||
389 | return retval; | 389 | return retval; |
390 | } | 390 | } |
@@ -452,10 +452,10 @@ static inline int test_and_change_bit(unsigned long nr, | |||
452 | 452 | ||
453 | a += nr >> SZLONG_LOG; | 453 | a += nr >> SZLONG_LOG; |
454 | mask = 1UL << bit; | 454 | mask = 1UL << bit; |
455 | local_irq_save(flags); | 455 | raw_local_irq_save(flags); |
456 | retval = (mask & *a) != 0; | 456 | retval = (mask & *a) != 0; |
457 | *a ^= mask; | 457 | *a ^= mask; |
458 | local_irq_restore(flags); | 458 | raw_local_irq_restore(flags); |
459 | 459 | ||
460 | return retval; | 460 | return retval; |
461 | } | 461 | } |
diff --git a/include/asm-mips/system.h b/include/asm-mips/system.h index 597a3743f6a1..290887077e44 100644 --- a/include/asm-mips/system.h +++ b/include/asm-mips/system.h | |||
@@ -121,10 +121,10 @@ static inline unsigned long __xchg_u32(volatile int * m, unsigned int val) | |||
121 | } else { | 121 | } else { |
122 | unsigned long flags; | 122 | unsigned long flags; |
123 | 123 | ||
124 | local_irq_save(flags); | 124 | raw_local_irq_save(flags); |
125 | retval = *m; | 125 | retval = *m; |
126 | *m = val; | 126 | *m = val; |
127 | local_irq_restore(flags); /* implies memory barrier */ | 127 | raw_local_irq_restore(flags); /* implies memory barrier */ |
128 | } | 128 | } |
129 | 129 | ||
130 | smp_mb(); | 130 | smp_mb(); |
@@ -169,10 +169,10 @@ static inline __u64 __xchg_u64(volatile __u64 * m, __u64 val) | |||
169 | } else { | 169 | } else { |
170 | unsigned long flags; | 170 | unsigned long flags; |
171 | 171 | ||
172 | local_irq_save(flags); | 172 | raw_local_irq_save(flags); |
173 | retval = *m; | 173 | retval = *m; |
174 | *m = val; | 174 | *m = val; |
175 | local_irq_restore(flags); /* implies memory barrier */ | 175 | raw_local_irq_restore(flags); /* implies memory barrier */ |
176 | } | 176 | } |
177 | 177 | ||
178 | smp_mb(); | 178 | smp_mb(); |
@@ -250,11 +250,11 @@ static inline unsigned long __cmpxchg_u32(volatile int * m, unsigned long old, | |||
250 | } else { | 250 | } else { |
251 | unsigned long flags; | 251 | unsigned long flags; |
252 | 252 | ||
253 | local_irq_save(flags); | 253 | raw_local_irq_save(flags); |
254 | retval = *m; | 254 | retval = *m; |
255 | if (retval == old) | 255 | if (retval == old) |
256 | *m = new; | 256 | *m = new; |
257 | local_irq_restore(flags); /* implies memory barrier */ | 257 | raw_local_irq_restore(flags); /* implies memory barrier */ |
258 | } | 258 | } |
259 | 259 | ||
260 | smp_mb(); | 260 | smp_mb(); |
@@ -304,11 +304,11 @@ static inline unsigned long __cmpxchg_u64(volatile int * m, unsigned long old, | |||
304 | } else { | 304 | } else { |
305 | unsigned long flags; | 305 | unsigned long flags; |
306 | 306 | ||
307 | local_irq_save(flags); | 307 | raw_local_irq_save(flags); |
308 | retval = *m; | 308 | retval = *m; |
309 | if (retval == old) | 309 | if (retval == old) |
310 | *m = new; | 310 | *m = new; |
311 | local_irq_restore(flags); /* implies memory barrier */ | 311 | raw_local_irq_restore(flags); /* implies memory barrier */ |
312 | } | 312 | } |
313 | 313 | ||
314 | smp_mb(); | 314 | smp_mb(); |