]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[S390] raw_local_save_flags/raw_local_irq_restore type check
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Wed, 12 Jul 2006 14:39:47 +0000 (16:39 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 12 Jul 2006 14:39:47 +0000 (16:39 +0200)
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>
include/asm-s390/irqflags.h

index 65f4db627e7a21def4574b3afdccd90c539d6be2..3b566a5b3cc73e19d2487931283da12a0b008d65 100644 (file)
        __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); \
 })