GNU Linux-libre 4.9.311-gnu1
[releases.git] / arch / sparc / include / asm / bug.h
1 #ifndef _SPARC_BUG_H
2 #define _SPARC_BUG_H
3
4 #ifdef CONFIG_BUG
5 #include <linux/compiler.h>
6
7 #ifdef CONFIG_DEBUG_BUGVERBOSE
8 void do_BUG(const char *file, int line);
9 #define BUG() do {                                      \
10         do_BUG(__FILE__, __LINE__);                     \
11         barrier_before_unreachable();                   \
12         __builtin_trap();                               \
13 } while (0)
14 #else
15 #define BUG() do {                                      \
16         barrier_before_unreachable();                   \
17         __builtin_trap();                               \
18 } while (0)
19 #endif
20
21 #define HAVE_ARCH_BUG
22 #endif
23
24 #include <asm-generic/bug.h>
25
26 struct pt_regs;
27 void __noreturn die_if_kernel(char *str, struct pt_regs *regs);
28
29 #endif