aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2007-01-01 13:45:34 -0500
committerPaul Mackerras <paulus@samba.org>2007-01-09 01:03:02 -0500
commit007d88d042d7b71aa2c9fc615aef97888e20ddf3 (patch)
treea379db67a9ed8c0c118ccf6d394637c9010c9a2c /include/asm-powerpc
parent673aeb76d07f49f2b07792f813bc2a9fee212ab7 (diff)
[POWERPC] Fix manual assembly WARN_ON() in enter_rtas().
When we switched over to the generic BUG mechanism we forgot to change the assembly code which open-codes a WARN_ON() in enter_rtas(), so the bug table got corrupted. This patch provides an EMIT_BUG_ENTRY macro for use in assembly code, and uses it in entry_64.S. Tested with CONFIG_DEBUG_BUGVERBOSE on ppc64 but not without -- I tried to turn it off but it wouldn't go away; I suspect Aunt Tillie probably needed it. This version gets __FILE__ and __LINE__ right in the assembly version -- rather than saying include/asm-powerpc/bug.h line 21 every time which is a little suboptimal. Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/asm-powerpc')
-rw-r--r--include/asm-powerpc/bug.h27
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"
205001: PPC_LONG \addr, 5002f
21 .short \line, \flags
22 .org 5001b+BUG_ENTRY_SIZE
23 .previous
24 .section .rodata,"a"
255002: .asciz "\file"
26 .previous
27.endm
28#else
29 .macro EMIT_BUG_ENTRY addr,file,line,flags
30 .section __bug_table,"a"
315001: 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