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 */
55 #define WARN_ON(x) ({ \
56 int __ret_warn_on = !!(x); \
57 if (__builtin_constant_p(__ret_warn_on)) { \
59 __EMIT_BUG(BUGFLAG_WARNING); \
61 if (unlikely(__ret_warn_on)) \
62 __EMIT_BUG(BUGFLAG_WARNING); \
64 unlikely(__ret_warn_on); \
68 #define HAVE_ARCH_WARN_ON
69 #endif /* CONFIG_BUG */
71 #include <asm-generic/bug.h>
73 #endif /* _ASM_S390_BUG_H */