]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-parisc/bug.h
Driver core: Make platform_device.id an int
[linux-2.6-omap-h63xx.git] / include / asm-parisc / bug.h
index 8dd199f5d6d7909f180de08a858c3d895921c88a..8cfc553fc837267e2342cbf66f4ef27efacde143 100644 (file)
 #define        PARISC_BUG_BREAK_ASM    "break 0x1f, 0x1fff"
 #define        PARISC_BUG_BREAK_INSN   0x03ffe01f  /* PARISC_BUG_BREAK_ASM */
 
-#ifdef CONFIG_64BIT
-#define ASM_ULONG_INSN         ".dword"
+#if defined(CONFIG_64BIT)
+#define ASM_WORD_INSN          ".dword\t"
 #else
-#define ASM_ULONG_INSN         ".word"
+#define ASM_WORD_INSN          ".word\t"
 #endif
 
 #ifdef CONFIG_DEBUG_BUGVERBOSE
@@ -26,7 +26,7 @@
                asm volatile("\n"                                       \
                             "1:\t" PARISC_BUG_BREAK_ASM "\n"           \
                             "\t.pushsection __bug_table,\"a\"\n"       \
-                            "2:\t" ASM_ULONG_INSN " 1b, %c0\n"         \
+                            "2:\t" ASM_WORD_INSN "1b, %c0\n"           \
                             "\t.short %c1, %c2\n"                      \
                             "\t.org 2b+%c3\n"                          \
                             "\t.popsection"                            \
        } while(0)
 #endif
 
+#ifdef CONFIG_DEBUG_BUGVERBOSE
 #define __WARN()                                                       \
        do {                                                            \
                asm volatile("\n"                                       \
                             "1:\t" PARISC_BUG_BREAK_ASM "\n"           \
                             "\t.pushsection __bug_table,\"a\"\n"       \
-                            "2:\t" ASM_ULONG_INSN " 1b, %c0\n"         \
+                            "2:\t" ASM_WORD_INSN "1b, %c0\n"           \
                             "\t.short %c1, %c2\n"                      \
                             "\t.org 2b+%c3\n"                          \
                             "\t.popsection"                            \
                             "i" (BUGFLAG_WARNING),                     \
                             "i" (sizeof(struct bug_entry)) );          \
        } while(0)
+#else
+#define __WARN()                                                       \
+       do {                                                            \
+               asm volatile("\n"                                       \
+                            "1:\t" PARISC_BUG_BREAK_ASM "\n"           \
+                            "\t.pushsection __bug_table,\"a\"\n"       \
+                            "2:\t" ASM_WORD_INSN "1b\n"                \
+                            "\t.short %c0\n"                           \
+                            "\t.org 2b+%c1\n"                          \
+                            "\t.popsection"                            \
+                            : : "i" (BUGFLAG_WARNING),                 \
+                            "i" (sizeof(struct bug_entry)) );          \
+       } while(0)
+#endif
 
 
 #define WARN_ON(x) ({                                          \
-       typeof(x) __ret_warn_on = (x);                          \
+       int __ret_warn_on = !!(x);                              \
        if (__builtin_constant_p(__ret_warn_on)) {              \
                if (__ret_warn_on)                              \
                        __WARN();                               \