diff options
Diffstat (limited to 'include/asm-sh/system.h')
| -rw-r--r-- | include/asm-sh/system.h | 36 |
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 | ||
| 82 | static __inline__ unsigned long tas(volatile int *m) | 82 | static 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 | ||
| 164 | static __inline__ void local_irq_disable(void) | 164 | static 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 | ||
| 175 | static __inline__ void set_bl_bit(void) | 175 | static 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 | ||
| 188 | static __inline__ void clear_bl_bit(void) | 188 | static 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 | ||
| 210 | static __inline__ unsigned long local_irq_save(void) | 210 | static 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 | ||
| 227 | static __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. |
