diff options
Diffstat (limited to 'include/asm-generic/atomic.h')
-rw-r--r-- | include/asm-generic/atomic.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/asm-generic/atomic.h b/include/asm-generic/atomic.h index 058129e9b04c..e53347fbf1da 100644 --- a/include/asm-generic/atomic.h +++ b/include/asm-generic/atomic.h | |||
@@ -57,11 +57,11 @@ static inline int atomic_add_return(int i, atomic_t *v) | |||
57 | unsigned long flags; | 57 | unsigned long flags; |
58 | int temp; | 58 | int temp; |
59 | 59 | ||
60 | local_irq_save(flags); | 60 | raw_local_irq_save(flags); /* Don't trace it in a irqsoff handler */ |
61 | temp = v->counter; | 61 | temp = v->counter; |
62 | temp += i; | 62 | temp += i; |
63 | v->counter = temp; | 63 | v->counter = temp; |
64 | local_irq_restore(flags); | 64 | raw_local_irq_restore(flags); |
65 | 65 | ||
66 | return temp; | 66 | return temp; |
67 | } | 67 | } |
@@ -78,11 +78,11 @@ static inline int atomic_sub_return(int i, atomic_t *v) | |||
78 | unsigned long flags; | 78 | unsigned long flags; |
79 | int temp; | 79 | int temp; |
80 | 80 | ||
81 | local_irq_save(flags); | 81 | raw_local_irq_save(flags); /* Don't trace it in a irqsoff handler */ |
82 | temp = v->counter; | 82 | temp = v->counter; |
83 | temp -= i; | 83 | temp -= i; |
84 | v->counter = temp; | 84 | v->counter = temp; |
85 | local_irq_restore(flags); | 85 | raw_local_irq_restore(flags); |
86 | 86 | ||
87 | return temp; | 87 | return temp; |
88 | } | 88 | } |
@@ -135,9 +135,9 @@ static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr) | |||
135 | unsigned long flags; | 135 | unsigned long flags; |
136 | 136 | ||
137 | mask = ~mask; | 137 | mask = ~mask; |
138 | local_irq_save(flags); | 138 | raw_local_irq_save(flags); /* Don't trace it in a irqsoff handler */ |
139 | *addr &= mask; | 139 | *addr &= mask; |
140 | local_irq_restore(flags); | 140 | raw_local_irq_restore(flags); |
141 | } | 141 | } |
142 | 142 | ||
143 | #define atomic_xchg(ptr, v) (xchg(&(ptr)->counter, (v))) | 143 | #define atomic_xchg(ptr, v) (xchg(&(ptr)->counter, (v))) |