diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2006-07-12 16:39:47 +0200 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2006-07-12 16:39:47 +0200 |
commit | 63f4f9e1281ea9b9a2304bd13d657ba9d401c9a7 (patch) | |
tree | 07a057d8e434fbbd8d21cff9c0562628eb27cd85 /include/asm-s390 | |
parent | f4a10b211ddb71d6b4e423fd529468691dec5cca (diff) | |
download | blackbird-op-linux-63f4f9e1281ea9b9a2304bd13d657ba9d401c9a7.tar.gz blackbird-op-linux-63f4f9e1281ea9b9a2304bd13d657ba9d401c9a7.zip |
[S390] raw_local_save_flags/raw_local_irq_restore type check
Make sure that raw_local_save_flags and raw_local_irq_restore always get an
unsigned long parameter. raw_irqs_disabled should call raw_local_save_flags
instead of local_save_flags.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'include/asm-s390')
-rw-r--r-- | include/asm-s390/irqflags.h | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/include/asm-s390/irqflags.h b/include/asm-s390/irqflags.h index 65f4db627e7a..3b566a5b3cc7 100644 --- a/include/asm-s390/irqflags.h +++ b/include/asm-s390/irqflags.h @@ -25,16 +25,22 @@ __flags; \ }) -#define raw_local_save_flags(x) \ - __asm__ __volatile__("stosm 0(%1),0" : "=m" (x) : "a" (&x), "m" (x) ) - -#define raw_local_irq_restore(x) \ - __asm__ __volatile__("ssm 0(%0)" : : "a" (&x), "m" (x) : "memory") +#define raw_local_save_flags(x) \ +do { \ + typecheck(unsigned long, x); \ + __asm__ __volatile__("stosm 0(%1),0" : "=m" (x) : "a" (&x), "m" (x) ); \ +} while (0) + +#define raw_local_irq_restore(x) \ +do { \ + typecheck(unsigned long, x); \ + __asm__ __volatile__("ssm 0(%0)" : : "a" (&x), "m" (x) : "memory"); \ +} while (0) #define raw_irqs_disabled() \ ({ \ unsigned long flags; \ - local_save_flags(flags); \ + raw_local_save_flags(flags); \ !((flags >> __FLAG_SHIFT) & 3); \ }) |