5 unsigned long bug_addr
;
12 * If this bit is set in the line number it means that the trap
13 * is for WARN_ON rather than BUG or BUG_ON.
15 #define BUG_WARNING_TRAP 0x1000000
18 __asm__ __volatile__( \
20 ".section __bug_table,\"a\"\n\t" \
21 " .long 1b,%0,%1,%2\n" \
23 : : "i" (__LINE__), "i" (__FILE__), "i" (__FUNCTION__)); \
26 #define BUG_ON(x) do { \
27 if (!__builtin_constant_p(x) || (x)) { \
28 __asm__ __volatile__( \
30 ".section __bug_table,\"a\"\n\t" \
31 " .long 1b,%1,%2,%3\n" \
33 : : "r" (x), "i" (__LINE__), "i" (__FILE__), \
34 "i" (__FUNCTION__)); \
38 #define WARN_ON(x) do { \
39 if (!__builtin_constant_p(x) || (x)) { \
40 __asm__ __volatile__( \
42 ".section __bug_table,\"a\"\n\t" \
43 " .long 1b,%1,%2,%3\n" \
45 : : "r" (x), "i" (__LINE__ + BUG_WARNING_TRAP), \
46 "i" (__FILE__), "i" (__FUNCTION__)); \
51 #define HAVE_ARCH_BUG_ON
52 #define HAVE_ARCH_WARN_ON
53 #include <asm-generic/bug.h>