1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _ASM_S390_BUG_H
3 #define _ASM_S390_BUG_H
5 #include <linux/compiler.h>
9 #ifdef CONFIG_DEBUG_BUGVERBOSE
11 #define __EMIT_BUG(x) do { \
12 asm_inline volatile( \
14 ".section .rodata.str,\"aMS\",@progbits,1\n" \
15 "1: .asciz \""__FILE__"\"\n" \
17 ".section __bug_table,\"aw\"\n" \
25 "i" (sizeof(struct bug_entry))); \
28 #else /* CONFIG_DEBUG_BUGVERBOSE */
30 #define __EMIT_BUG(x) do { \
31 asm_inline volatile( \
33 ".section __bug_table,\"aw\"\n" \
39 "i" (sizeof(struct bug_entry))); \
42 #endif /* CONFIG_DEBUG_BUGVERBOSE */
49 #define __WARN_FLAGS(flags) do { \
50 __EMIT_BUG(BUGFLAG_WARNING|(flags)); \
53 #define WARN_ON(x) ({ \
54 int __ret_warn_on = !!(x); \
55 if (__builtin_constant_p(__ret_warn_on)) { \
59 if (unlikely(__ret_warn_on)) \
62 unlikely(__ret_warn_on); \
66 #define HAVE_ARCH_WARN_ON
67 #endif /* CONFIG_BUG */
69 #include <asm-generic/bug.h>
71 #endif /* _ASM_S390_BUG_H */