aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sh/system.h
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2006-09-27 04:03:56 -0400
committerPaul Mundt <lethal@linux-sh.org>2006-09-27 04:03:56 -0400
commit0f08f338083cc1d68788ccbccc44bd0502fc57ae (patch)
tree97c69dbbd63a108a7367644dadedd390a3948f0c /include/asm-sh/system.h
parent9e3043c091819729ecf4fc5063d0a2d0954dfd7f (diff)
sh: More cosmetic cleanups and trivial fixes.
Nothing exciting here, just trivial fixes.. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'include/asm-sh/system.h')
-rw-r--r--include/asm-sh/system.h36
1 files changed, 5 insertions, 31 deletions
diff --git a/include/asm-sh/system.h b/include/asm-sh/system.h
index 477422afeb0d..6c1f8fde5ac4 100644
--- a/include/asm-sh/system.h
+++ b/include/asm-sh/system.h
@@ -79,7 +79,7 @@ static inline void sched_cacheflush(void)
79} 79}
80#endif 80#endif
81 81
82static __inline__ unsigned long tas(volatile int *m) 82static inline unsigned long tas(volatile int *m)
83{ 83{
84 unsigned long retval; 84 unsigned long retval;
85 85
@@ -161,7 +161,7 @@ static inline void local_irq_enable(void)
161} 161}
162#endif 162#endif
163 163
164static __inline__ void local_irq_disable(void) 164static inline void local_irq_disable(void)
165{ 165{
166 unsigned long __dummy; 166 unsigned long __dummy;
167 __asm__ __volatile__("stc sr, %0\n\t" 167 __asm__ __volatile__("stc sr, %0\n\t"
@@ -172,7 +172,7 @@ static __inline__ void local_irq_disable(void)
172 : "memory"); 172 : "memory");
173} 173}
174 174
175static __inline__ void set_bl_bit(void) 175static inline void set_bl_bit(void)
176{ 176{
177 unsigned long __dummy0, __dummy1; 177 unsigned long __dummy0, __dummy1;
178 178
@@ -185,7 +185,7 @@ static __inline__ void set_bl_bit(void)
185 : "memory"); 185 : "memory");
186} 186}
187 187
188static __inline__ void clear_bl_bit(void) 188static inline void clear_bl_bit(void)
189{ 189{
190 unsigned long __dummy0, __dummy1; 190 unsigned long __dummy0, __dummy1;
191 191
@@ -207,7 +207,7 @@ static __inline__ void clear_bl_bit(void)
207 (flags != 0); \ 207 (flags != 0); \
208}) 208})
209 209
210static __inline__ unsigned long local_irq_save(void) 210static inline unsigned long local_irq_save(void)
211{ 211{
212 unsigned long flags, __dummy; 212 unsigned long flags, __dummy;
213 213
@@ -223,36 +223,10 @@ static __inline__ unsigned long local_irq_save(void)
223 return flags; 223 return flags;
224} 224}
225 225
226#ifdef DEBUG_CLI_STI
227static __inline__ void local_irq_restore(unsigned long x)
228{
229 if ((x & 0x000000f0) != 0x000000f0)
230 local_irq_enable();
231 else {
232 unsigned long flags;
233 local_save_flags(flags);
234
235 if (flags == 0) {
236 extern void dump_stack(void);
237 printk(KERN_ERR "BUG!\n");
238 dump_stack();
239 local_irq_disable();
240 }
241 }
242}
243#else
244#define local_irq_restore(x) do { \ 226#define local_irq_restore(x) do { \
245 if ((x & 0x000000f0) != 0x000000f0) \ 227 if ((x & 0x000000f0) != 0x000000f0) \
246 local_irq_enable(); \ 228 local_irq_enable(); \
247} while (0) 229} while (0)
248#endif
249
250#define really_restore_flags(x) do { \
251 if ((x & 0x000000f0) != 0x000000f0) \
252 local_irq_enable(); \
253 else \
254 local_irq_disable(); \
255} while (0)
256 230
257/* 231/*
258 * Jump to P2 area. 232 * Jump to P2 area.