1 #ifndef _ASM_S390_BUG_H
2 #define _ASM_S390_BUG_H
4 #include <linux/kernel.h>
9 #define S390_LONG ".quad"
11 #define S390_LONG ".long"
14 #ifdef CONFIG_DEBUG_BUGVERBOSE
16 #define __EMIT_BUG(x) do { \
20 ".section .rodata.str,\"aMS\",@progbits,1\n" \
21 "2: .asciz \""__FILE__"\"\n" \
23 ".section __bug_table,\"a\"\n" \
24 "3:\t" S390_LONG "\t1b,2b\n" \
30 "i" (sizeof(struct bug_entry))); \
33 #else /* CONFIG_DEBUG_BUGVERBOSE */
35 #define __EMIT_BUG(x) do { \
39 ".section __bug_table,\"a\"\n" \
40 "2:\t" S390_LONG "\t1b\n" \
45 "i" (sizeof(struct bug_entry))); \
48 #endif /* CONFIG_DEBUG_BUGVERBOSE */
50 #define BUG() __EMIT_BUG(0)
52 #define WARN_ON(x) ({ \
53 int __ret_warn_on = !!(x); \
54 if (__builtin_constant_p(__ret_warn_on)) { \
56 __EMIT_BUG(BUGFLAG_WARNING); \
58 if (unlikely(__ret_warn_on)) \
59 __EMIT_BUG(BUGFLAG_WARNING); \
61 unlikely(__ret_warn_on); \
65 #define HAVE_ARCH_WARN_ON
66 #endif /* CONFIG_BUG */
68 #include <asm-generic/bug.h>
70 #endif /* _ASM_S390_BUG_H */