diff options
author | Jeremy Fitzhardinge <jeremy@goop.org> | 2006-12-08 06:30:41 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-12-11 00:35:07 -0500 |
commit | 73c9ceab40b1269d6195e556773167c078ac8311 (patch) | |
tree | d1de1c286b58a8b1e8dcd0e690ac6e8724e990f5 /arch/powerpc/xmon/xmon.c | |
parent | 973c1fabc70deb10f12a0eaab2f50c2263784257 (diff) |
[POWERPC] Generic BUG for powerpc
This makes powerpc use the generic BUG machinery. The biggest reports the
function name, since it is redundant with kallsyms, and not needed in general.
There is an overall reduction of code, since module_32/64 duplicated several
functions.
Unfortunately there's no way to tell gcc that BUG won't return, so the BUG
macro includes a goto loop. This will generate a real jmp instruction, which
is never used.
[akpm@osdl.org: build fix]
[paulus@samba.org: remove infinite loop in BUG_ON]
Signed-off-by: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Andi Kleen <ak@muc.de>
Cc: Hugh Dickens <hugh@veritas.com>
Cc: Michael Ellerman <michael@ellerman.id.au>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/xmon/xmon.c')
-rw-r--r-- | arch/powerpc/xmon/xmon.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c index a34ed49e0356..77540a2f7704 100644 --- a/arch/powerpc/xmon/xmon.c +++ b/arch/powerpc/xmon/xmon.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/sysrq.h> | 22 | #include <linux/sysrq.h> |
23 | #include <linux/interrupt.h> | 23 | #include <linux/interrupt.h> |
24 | #include <linux/irq.h> | 24 | #include <linux/irq.h> |
25 | #include <linux/bug.h> | ||
25 | 26 | ||
26 | #include <asm/ptrace.h> | 27 | #include <asm/ptrace.h> |
27 | #include <asm/string.h> | 28 | #include <asm/string.h> |
@@ -35,7 +36,6 @@ | |||
35 | #include <asm/cputable.h> | 36 | #include <asm/cputable.h> |
36 | #include <asm/rtas.h> | 37 | #include <asm/rtas.h> |
37 | #include <asm/sstep.h> | 38 | #include <asm/sstep.h> |
38 | #include <asm/bug.h> | ||
39 | #include <asm/irq_regs.h> | 39 | #include <asm/irq_regs.h> |
40 | #include <asm/spu.h> | 40 | #include <asm/spu.h> |
41 | #include <asm/spu_priv1.h> | 41 | #include <asm/spu_priv1.h> |
@@ -1346,7 +1346,7 @@ static void backtrace(struct pt_regs *excp) | |||
1346 | 1346 | ||
1347 | static void print_bug_trap(struct pt_regs *regs) | 1347 | static void print_bug_trap(struct pt_regs *regs) |
1348 | { | 1348 | { |
1349 | struct bug_entry *bug; | 1349 | const struct bug_entry *bug; |
1350 | unsigned long addr; | 1350 | unsigned long addr; |
1351 | 1351 | ||
1352 | if (regs->msr & MSR_PR) | 1352 | if (regs->msr & MSR_PR) |
@@ -1357,11 +1357,11 @@ static void print_bug_trap(struct pt_regs *regs) | |||
1357 | bug = find_bug(regs->nip); | 1357 | bug = find_bug(regs->nip); |
1358 | if (bug == NULL) | 1358 | if (bug == NULL) |
1359 | return; | 1359 | return; |
1360 | if (bug->line & BUG_WARNING_TRAP) | 1360 | if (is_warning_bug(bug)) |
1361 | return; | 1361 | return; |
1362 | 1362 | ||
1363 | printf("kernel BUG in %s at %s:%d!\n", | 1363 | printf("kernel BUG at %s:%u!\n", |
1364 | bug->function, bug->file, (unsigned int)bug->line); | 1364 | bug->file, bug->line); |
1365 | } | 1365 | } |
1366 | 1366 | ||
1367 | void excprint(struct pt_regs *fp) | 1367 | void excprint(struct pt_regs *fp) |