diff options
Diffstat (limited to 'include/asm-powerpc/bug.h')
-rw-r--r-- | include/asm-powerpc/bug.h | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/include/asm-powerpc/bug.h b/include/asm-powerpc/bug.h index 709568879f73..f6fa39474846 100644 --- a/include/asm-powerpc/bug.h +++ b/include/asm-powerpc/bug.h | |||
@@ -11,10 +11,31 @@ | |||
11 | #define BUG_OPCODE .long 0x00b00b00 /* For asm */ | 11 | #define BUG_OPCODE .long 0x00b00b00 /* For asm */ |
12 | #define BUG_ILLEGAL_INSTR "0x00b00b00" /* For BUG macro */ | 12 | #define BUG_ILLEGAL_INSTR "0x00b00b00" /* For BUG macro */ |
13 | 13 | ||
14 | #ifndef __ASSEMBLY__ | ||
15 | |||
16 | #ifdef CONFIG_BUG | 14 | #ifdef CONFIG_BUG |
17 | 15 | ||
16 | #ifdef __ASSEMBLY__ | ||
17 | #ifdef CONFIG_DEBUG_BUGVERBOSE | ||
18 | .macro EMIT_BUG_ENTRY addr,file,line,flags | ||
19 | .section __bug_table,"a" | ||
20 | 5001: PPC_LONG \addr, 5002f | ||
21 | .short \line, \flags | ||
22 | .org 5001b+BUG_ENTRY_SIZE | ||
23 | .previous | ||
24 | .section .rodata,"a" | ||
25 | 5002: .asciz "\file" | ||
26 | .previous | ||
27 | .endm | ||
28 | #else | ||
29 | .macro EMIT_BUG_ENTRY addr,file,line,flags | ||
30 | .section __bug_table,"a" | ||
31 | 5001: PPC_LONG \addr | ||
32 | .short \flags | ||
33 | .org 5001b+BUG_ENTRY_SIZE | ||
34 | .previous | ||
35 | .endm | ||
36 | #endif /* verbose */ | ||
37 | |||
38 | #else /* !__ASSEMBLY__ */ | ||
18 | /* _EMIT_BUG_ENTRY expects args %0,%1,%2,%3 to be FILE, LINE, flags and | 39 | /* _EMIT_BUG_ENTRY expects args %0,%1,%2,%3 to be FILE, LINE, flags and |
19 | sizeof(struct bug_entry), respectively */ | 40 | sizeof(struct bug_entry), respectively */ |
20 | #ifdef CONFIG_DEBUG_BUGVERBOSE | 41 | #ifdef CONFIG_DEBUG_BUGVERBOSE |
@@ -91,8 +112,8 @@ | |||
91 | #define HAVE_ARCH_BUG | 112 | #define HAVE_ARCH_BUG |
92 | #define HAVE_ARCH_BUG_ON | 113 | #define HAVE_ARCH_BUG_ON |
93 | #define HAVE_ARCH_WARN_ON | 114 | #define HAVE_ARCH_WARN_ON |
94 | #endif /* CONFIG_BUG */ | ||
95 | #endif /* __ASSEMBLY __ */ | 115 | #endif /* __ASSEMBLY __ */ |
116 | #endif /* CONFIG_BUG */ | ||
96 | 117 | ||
97 | #include <asm-generic/bug.h> | 118 | #include <asm-generic/bug.h> |
98 | 119 | ||