[PARISC] fix build for WARN_ON() when CONFIG_DEBUG_BUGVERBOSE=y
authorHelge Deller <deller@gmx.de>
Sat, 16 Dec 2006 16:48:26 +0000 (17:48 +0100)
committerKyle McMartin <kyle@athena.road.mcmartin.ca>
Sat, 17 Feb 2007 05:53:19 +0000 (00:53 -0500)
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
include/asm-parisc/bug.h

index 8dd199f5d6d7909f180de08a858c3d895921c88a..cfe39a2547aa15dfeb9fa3faefbc5654fcb4b3e0 100644 (file)
@@ -43,6 +43,7 @@
        } while(0)
 #endif
 
+#ifdef CONFIG_DEBUG_BUGVERBOSE
 #define __WARN()                                                       \
        do {                                                            \
                asm volatile("\n"                                       \
                             "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_ULONG_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) ({                                          \