diff options
author | Matt Fleming <matt@console-pimps.org> | 2009-08-16 21:54:48 +0100 |
---|---|---|
committer | Matt Fleming <matt@console-pimps.org> | 2009-08-21 13:02:44 +0100 |
commit | b344e24a8e8ceda83d1285d22e3e5baf4f5e42d3 (patch) | |
tree | 4b9500264a797736b48b59c3f0977277ace53386 /arch/sh/include/asm/system.h | |
parent | 97efbbd5886e27b61c19c77d41f6491f5d96fbd0 (diff) |
sh: unwinder: Introduce UNWINDER_BUG() and UNWINDER_BUG_ON()
We can't assume that if we execute the unwinder code and the unwinder
was already running that it has faulted. Clearly two kernel threads can
invoke the unwinder at the same time and may be running simultaneously.
The previous approach used BUG() and BUG_ON() in the unwinder code to
detect whether the unwinder was incapable of unwinding the stack, and
that the next available unwinder should be used instead. A better
approach is to explicitly invoke a trap handler to switch unwinders when
the current unwinder cannot continue.
Signed-off-by: Matt Fleming <matt@console-pimps.org>
Diffstat (limited to 'arch/sh/include/asm/system.h')
-rw-r--r-- | arch/sh/include/asm/system.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/sh/include/asm/system.h b/arch/sh/include/asm/system.h index ab79e1f4fbe..f9e2ceb94d9 100644 --- a/arch/sh/include/asm/system.h +++ b/arch/sh/include/asm/system.h @@ -181,6 +181,11 @@ BUILD_TRAP_HANDLER(breakpoint); BUILD_TRAP_HANDLER(singlestep); BUILD_TRAP_HANDLER(fpu_error); BUILD_TRAP_HANDLER(fpu_state_restore); +BUILD_TRAP_HANDLER(unwinder); + +#ifdef CONFIG_BUG +extern void handle_BUG(struct pt_regs *); +#endif #define arch_align_stack(x) (x) |