diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2006-07-05 08:27:42 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-07-05 08:27:42 -0400 |
commit | cf57a308436653f3094590202c77459aab250ff3 (patch) | |
tree | 8a9e7096e494141911147a1f24865c3d79d583c1 /include/asm-s390/system.h | |
parent | faac9bd0e3ce7cb0572ec66e0a426cacf6afa970 (diff) | |
parent | ca78f6baca863afe2e6a244a0fe94b3a70211d46 (diff) |
Merge branch 'master'
Diffstat (limited to 'include/asm-s390/system.h')
-rw-r--r-- | include/asm-s390/system.h | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/include/asm-s390/system.h b/include/asm-s390/system.h index 71a0732cd518..9ab186ffde23 100644 --- a/include/asm-s390/system.h +++ b/include/asm-s390/system.h | |||
@@ -301,34 +301,6 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) | |||
301 | #define set_mb(var, value) do { var = value; mb(); } while (0) | 301 | #define set_mb(var, value) do { var = value; mb(); } while (0) |
302 | #define set_wmb(var, value) do { var = value; wmb(); } while (0) | 302 | #define set_wmb(var, value) do { var = value; wmb(); } while (0) |
303 | 303 | ||
304 | /* interrupt control.. */ | ||
305 | #define local_irq_enable() ({ \ | ||
306 | unsigned long __dummy; \ | ||
307 | __asm__ __volatile__ ( \ | ||
308 | "stosm 0(%1),0x03" \ | ||
309 | : "=m" (__dummy) : "a" (&__dummy) : "memory" ); \ | ||
310 | }) | ||
311 | |||
312 | #define local_irq_disable() ({ \ | ||
313 | unsigned long __flags; \ | ||
314 | __asm__ __volatile__ ( \ | ||
315 | "stnsm 0(%1),0xfc" : "=m" (__flags) : "a" (&__flags) ); \ | ||
316 | __flags; \ | ||
317 | }) | ||
318 | |||
319 | #define local_save_flags(x) \ | ||
320 | __asm__ __volatile__("stosm 0(%1),0" : "=m" (x) : "a" (&x), "m" (x) ) | ||
321 | |||
322 | #define local_irq_restore(x) \ | ||
323 | __asm__ __volatile__("ssm 0(%0)" : : "a" (&x), "m" (x) : "memory") | ||
324 | |||
325 | #define irqs_disabled() \ | ||
326 | ({ \ | ||
327 | unsigned long flags; \ | ||
328 | local_save_flags(flags); \ | ||
329 | !((flags >> __FLAG_SHIFT) & 3); \ | ||
330 | }) | ||
331 | |||
332 | #ifdef __s390x__ | 304 | #ifdef __s390x__ |
333 | 305 | ||
334 | #define __ctl_load(array, low, high) ({ \ | 306 | #define __ctl_load(array, low, high) ({ \ |
@@ -442,8 +414,7 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) | |||
442 | }) | 414 | }) |
443 | #endif /* __s390x__ */ | 415 | #endif /* __s390x__ */ |
444 | 416 | ||
445 | /* For spinlocks etc */ | 417 | #include <linux/irqflags.h> |
446 | #define local_irq_save(x) ((x) = local_irq_disable()) | ||
447 | 418 | ||
448 | /* | 419 | /* |
449 | * Use to set psw mask except for the first byte which | 420 | * Use to set psw mask except for the first byte which |
@@ -482,4 +453,3 @@ extern void (*_machine_power_off)(void); | |||
482 | #endif /* __KERNEL__ */ | 453 | #endif /* __KERNEL__ */ |
483 | 454 | ||
484 | #endif | 455 | #endif |
485 | |||