aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/include/asm/atomic.h
diff options
context:
space:
mode:
authorYi Li <yi.li@analog.com>2009-01-07 10:14:39 -0500
committerBryan Wu <cooloney@kernel.org>2009-01-07 10:14:39 -0500
commit6a01f230339321292cf065551f8cf55361052461 (patch)
tree7ac2ac8fc9f05a7315ef6a7f6f0a387433c62c14 /arch/blackfin/include/asm/atomic.h
parent5105432a3201e3f0e6c219cd0a74feee1e5e262b (diff)
Blackfin arch: merge adeos blackfin part to arch/blackfin/
[Mike Frysinger <vapier.adi@gmail.com>: - handle bf531/bf532/bf534/bf536 variants in ipipe.h - cleanup IPIPE logic for bfin_set_irq_handler() - cleanup ipipe asm code a bit and add missing ENDPROC() - simplify IPIPE code in trap_c - unify some of the IPIPE code and fix style - simplify DO_IRQ_L1 handling with ipipe code - revert IRQ_SW_INT# addition from ipipe merge - remove duplicate get_{c,s}clk() prototypes ] Signed-off-by: Yi Li <yi.li@analog.com> Signed-off-by: Mike Frysinger <vapier.adi@gmail.com> Signed-off-by: Bryan Wu <cooloney@kernel.org>
Diffstat (limited to 'arch/blackfin/include/asm/atomic.h')
-rw-r--r--arch/blackfin/include/asm/atomic.h32
1 files changed, 16 insertions, 16 deletions
diff --git a/arch/blackfin/include/asm/atomic.h b/arch/blackfin/include/asm/atomic.h
index d76275e5638c..94b2a9b19451 100644
--- a/arch/blackfin/include/asm/atomic.h
+++ b/arch/blackfin/include/asm/atomic.h
@@ -92,18 +92,18 @@ static inline void atomic_add(int i, atomic_t *v)
92{ 92{
93 long flags; 93 long flags;
94 94
95 local_irq_save(flags); 95 local_irq_save_hw(flags);
96 v->counter += i; 96 v->counter += i;
97 local_irq_restore(flags); 97 local_irq_restore_hw(flags);
98} 98}
99 99
100static inline void atomic_sub(int i, atomic_t *v) 100static inline void atomic_sub(int i, atomic_t *v)
101{ 101{
102 long flags; 102 long flags;
103 103
104 local_irq_save(flags); 104 local_irq_save_hw(flags);
105 v->counter -= i; 105 v->counter -= i;
106 local_irq_restore(flags); 106 local_irq_restore_hw(flags);
107 107
108} 108}
109 109
@@ -112,10 +112,10 @@ static inline int atomic_add_return(int i, atomic_t *v)
112 int __temp = 0; 112 int __temp = 0;
113 long flags; 113 long flags;
114 114
115 local_irq_save(flags); 115 local_irq_save_hw(flags);
116 v->counter += i; 116 v->counter += i;
117 __temp = v->counter; 117 __temp = v->counter;
118 local_irq_restore(flags); 118 local_irq_restore_hw(flags);
119 119
120 120
121 return __temp; 121 return __temp;
@@ -126,10 +126,10 @@ static inline int atomic_sub_return(int i, atomic_t *v)
126 int __temp = 0; 126 int __temp = 0;
127 long flags; 127 long flags;
128 128
129 local_irq_save(flags); 129 local_irq_save_hw(flags);
130 v->counter -= i; 130 v->counter -= i;
131 __temp = v->counter; 131 __temp = v->counter;
132 local_irq_restore(flags); 132 local_irq_restore_hw(flags);
133 133
134 return __temp; 134 return __temp;
135} 135}
@@ -138,36 +138,36 @@ static inline void atomic_inc(volatile atomic_t *v)
138{ 138{
139 long flags; 139 long flags;
140 140
141 local_irq_save(flags); 141 local_irq_save_hw(flags);
142 v->counter++; 142 v->counter++;
143 local_irq_restore(flags); 143 local_irq_restore_hw(flags);
144} 144}
145 145
146static inline void atomic_dec(volatile atomic_t *v) 146static inline void atomic_dec(volatile atomic_t *v)
147{ 147{
148 long flags; 148 long flags;
149 149
150 local_irq_save(flags); 150 local_irq_save_hw(flags);
151 v->counter--; 151 v->counter--;
152 local_irq_restore(flags); 152 local_irq_restore_hw(flags);
153} 153}
154 154
155static inline void atomic_clear_mask(unsigned int mask, atomic_t *v) 155static inline void atomic_clear_mask(unsigned int mask, atomic_t *v)
156{ 156{
157 long flags; 157 long flags;
158 158
159 local_irq_save(flags); 159 local_irq_save_hw(flags);
160 v->counter &= ~mask; 160 v->counter &= ~mask;
161 local_irq_restore(flags); 161 local_irq_restore_hw(flags);
162} 162}
163 163
164static inline void atomic_set_mask(unsigned int mask, atomic_t *v) 164static inline void atomic_set_mask(unsigned int mask, atomic_t *v)
165{ 165{
166 long flags; 166 long flags;
167 167
168 local_irq_save(flags); 168 local_irq_save_hw(flags);
169 v->counter |= mask; 169 v->counter |= mask;
170 local_irq_restore(flags); 170 local_irq_restore_hw(flags);
171} 171}
172 172
173/* Atomic operations are already serializing */ 173/* Atomic operations are already serializing */