5 * Tell the user there is some problem.
6 * The offending file and line are encoded in the __bug_table section.
11 #define HAVE_ARCH_WARN_ON
13 /* the break instruction is used as BUG() marker. */
14 #define PARISC_BUG_BREAK_ASM "break 0x1f, 0x1fff"
15 #define PARISC_BUG_BREAK_INSN 0x03ffe01f /* PARISC_BUG_BREAK_ASM */
17 #if defined(CONFIG_64BIT)
18 #define ASM_WORD_INSN ".dword\t"
20 #define ASM_WORD_INSN ".word\t"
23 #ifdef CONFIG_DEBUG_BUGVERBOSE
27 "1:\t" PARISC_BUG_BREAK_ASM "\n" \
28 "\t.pushsection __bug_table,\"a\"\n" \
29 "2:\t" ASM_WORD_INSN "1b, %c0\n" \
30 "\t.short %c1, %c2\n" \
33 : : "i" (__FILE__), "i" (__LINE__), \
34 "i" (0), "i" (sizeof(struct bug_entry)) ); \
41 asm volatile(PARISC_BUG_BREAK_ASM : : ); \
46 #ifdef CONFIG_DEBUG_BUGVERBOSE
50 "1:\t" PARISC_BUG_BREAK_ASM "\n" \
51 "\t.pushsection __bug_table,\"a\"\n" \
52 "2:\t" ASM_WORD_INSN "1b, %c0\n" \
53 "\t.short %c1, %c2\n" \
56 : : "i" (__FILE__), "i" (__LINE__), \
57 "i" (BUGFLAG_WARNING), \
58 "i" (sizeof(struct bug_entry)) ); \
64 "1:\t" PARISC_BUG_BREAK_ASM "\n" \
65 "\t.pushsection __bug_table,\"a\"\n" \
66 "2:\t" ASM_WORD_INSN "1b\n" \
70 : : "i" (BUGFLAG_WARNING), \
71 "i" (sizeof(struct bug_entry)) ); \
76 #define WARN_ON(x) ({ \
77 typeof(x) __ret_warn_on = (x); \
78 if (__builtin_constant_p(__ret_warn_on)) { \
82 if (unlikely(__ret_warn_on)) \
85 unlikely(__ret_warn_on); \
90 #include <asm-generic/bug.h>