Go to the documentation of this file. 1 #ifndef _ASM_POWERPC_BUG_H
2 #define _ASM_POWERPC_BUG_H
5 #include <asm/asm-compat.h>
12 #define BUG_OPCODE .long 0x00b00b00
13 #define BUG_ILLEGAL_INSTR "0x00b00b00"
18 #include <asm/asm-offsets.h>
19 #ifdef CONFIG_DEBUG_BUGVERBOSE
21 .section __bug_table,
"a"
24 .org 5001
b+BUG_ENTRY_SIZE
32 .section __bug_table,
"a"
35 .org 5001
b+BUG_ENTRY_SIZE
43 #ifdef CONFIG_DEBUG_BUGVERBOSE
44 #define _EMIT_BUG_ENTRY \
45 ".section __bug_table,\"a\"\n" \
46 "2:\t" PPC_LONG "1b, %0\n" \
51 #define _EMIT_BUG_ENTRY \
52 ".section __bug_table,\"a\"\n" \
53 "2:\t" PPC_LONG "1b\n" \
66 __asm__ __volatile__( \
69 : : "i" (__FILE__), "i" (__LINE__), \
70 "i" (0), "i" (sizeof(struct bug_entry))); \
74 #define BUG_ON(x) do { \
75 if (__builtin_constant_p(x)) { \
79 __asm__ __volatile__( \
80 "1: "PPC_TLNEI" %4,0\n" \
82 : : "i" (__FILE__), "i" (__LINE__), "i" (0), \
83 "i" (sizeof(struct bug_entry)), \
84 "r" ((__force long)(x))); \
88 #define __WARN_TAINT(taint) do { \
89 __asm__ __volatile__( \
92 : : "i" (__FILE__), "i" (__LINE__), \
93 "i" (BUGFLAG_TAINT(taint)), \
94 "i" (sizeof(struct bug_entry))); \
97 #define WARN_ON(x) ({ \
98 int __ret_warn_on = !!(x); \
99 if (__builtin_constant_p(__ret_warn_on)) { \
103 __asm__ __volatile__( \
104 "1: "PPC_TLNEI" %4,0\n" \
106 : : "i" (__FILE__), "i" (__LINE__), \
107 "i" (BUGFLAG_TAINT(TAINT_WARN)), \
108 "i" (sizeof(struct bug_entry)), \
109 "r" (__ret_warn_on)); \
111 unlikely(__ret_warn_on); \
114 #define HAVE_ARCH_BUG
115 #define HAVE_ARCH_BUG_ON
116 #define HAVE_ARCH_WARN_ON
123 #define _EMIT_BUG_ENTRY
135 extern void die(
const char *,
struct pt_regs *,
long);
136 extern void print_backtrace(
unsigned long *);