1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _ASM_S390_BUG_H
3 #define _ASM_S390_BUG_H
5 #include <linux/kernel.h>
9 #ifdef CONFIG_DEBUG_BUGVERBOSE
11 #define __EMIT_BUG(x) do { \
15 ".section .rodata.str,\"aMS\",@progbits,1\n" \
16 "2: .asciz \""__FILE__"\"\n" \
18 ".section __bug_table,\"aw\"\n" \
19 "3: .long 1b-3b,2b-3b\n" \
25 "i" (sizeof(struct bug_entry))); \
28 #else /* CONFIG_DEBUG_BUGVERBOSE */
30 #define __EMIT_BUG(x) do { \
34 ".section __bug_table,\"aw\"\n" \
40 "i" (sizeof(struct bug_entry))); \
43 #endif /* CONFIG_DEBUG_BUGVERBOSE */
50 #define __WARN_FLAGS(flags) do { \
51 __EMIT_BUG(BUGFLAG_WARNING|(flags)); \
54 #define WARN_ON(x) ({ \
55 int __ret_warn_on = !!(x); \
56 if (__builtin_constant_p(__ret_warn_on)) { \
60 if (unlikely(__ret_warn_on)) \
63 unlikely(__ret_warn_on); \
67 #define HAVE_ARCH_WARN_ON
68 #endif /* CONFIG_BUG */
70 #include <asm-generic/bug.h>
72 #endif /* _ASM_S390_BUG_H */