From: Paul Mundt Date: Fri, 21 Aug 2009 18:49:58 +0000 (+0900) Subject: Merge branch 'sh/dwarf-unwinder' of git://github.com/mfleming/linux-2.6 into sh/dwarf... X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=c153a58e715e16ffcd6c4b3da7fc6b4a556bf917;p=linux-beck.git Merge branch 'sh/dwarf-unwinder' of git://github.com/mfleming/linux-2.6 into sh/dwarf-unwinder --- c153a58e715e16ffcd6c4b3da7fc6b4a556bf917 diff --cc arch/sh/kernel/unwinder.c index 5f56ff3f55e0,b9c122abe251..e83861d9739c --- a/arch/sh/kernel/unwinder.c +++ b/arch/sh/kernel/unwinder.c @@@ -157,8 -159,25 +160,26 @@@ void unwind_stack(struct task_struct *t } curr_unwinder->dump(task, regs, sp, ops, data); + } + + /* + * Trap handler for UWINDER_BUG() statements. We must switch to the + * unwinder with the next highest rating. + */ + BUILD_TRAP_HANDLER(unwinder) + { + insn_size_t insn; + TRAP_HANDLER_DECL; + + /* Rewind */ + regs->pc -= instruction_size(ctrl_inw(regs->pc - 4)); + insn = *(insn_size_t *)instruction_pointer(regs); + + /* Switch unwinders when unwind_stack() is called */ + unwinder_faulted = 1; - atomic_dec(&unwinder_running); + #ifdef CONFIG_BUG + handle_BUG(regs); + #endif } +EXPORT_SYMBOL_GPL(unwind_stack);