sh: unwinder: Introduce UNWINDER_BUG() and UNWINDER_BUG_ON()
commitb344e24a8e8ceda83d1285d22e3e5baf4f5e42d3
authorMatt Fleming <matt@console-pimps.org>
Sun, 16 Aug 2009 20:54:48 +0000 (16 21:54 +0100)
committerMatt Fleming <matt@console-pimps.org>
Fri, 21 Aug 2009 12:02:44 +0000 (21 13:02 +0100)
tree4b9500264a797736b48b59c3f0977277ace53386
parent97efbbd5886e27b61c19c77d41f6491f5d96fbd0
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>
arch/sh/include/asm/bug.h
arch/sh/include/asm/system.h
arch/sh/include/asm/unwinder.h
arch/sh/kernel/debugtraps.S
arch/sh/kernel/dwarf.c
arch/sh/kernel/traps.c
arch/sh/kernel/traps_32.c
arch/sh/kernel/unwinder.c