diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-08-21 16:28:25 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-08-21 16:28:25 -0400 |
commit | e115f2c17cbceee93b34d787a7a4a867fc73e7b4 (patch) | |
tree | 6ee0f20dcb5eca29793d68e97242c5e483c24cfc /arch/sh/kernel/unwinder.c | |
parent | c153a58e715e16ffcd6c4b3da7fc6b4a556bf917 (diff) |
sh: unwinder: Use a special bug flag for unwinder traps.
This simplifies the unwinder trap handling, dropping the use of the
special trapa vector and simply piggybacking on top of the BUG support. A
new BUGFLAG_UNWINDER is added for flagging the unwinder fault, before
continuing on with regular BUG dispatch.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/unwinder.c')
-rw-r--r-- | arch/sh/kernel/unwinder.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/arch/sh/kernel/unwinder.c b/arch/sh/kernel/unwinder.c index e83861d9739c..468889d958f4 100644 --- a/arch/sh/kernel/unwinder.c +++ b/arch/sh/kernel/unwinder.c | |||
@@ -161,25 +161,4 @@ void unwind_stack(struct task_struct *task, struct pt_regs *regs, | |||
161 | 161 | ||
162 | curr_unwinder->dump(task, regs, sp, ops, data); | 162 | curr_unwinder->dump(task, regs, sp, ops, data); |
163 | } | 163 | } |
164 | |||
165 | /* | ||
166 | * Trap handler for UWINDER_BUG() statements. We must switch to the | ||
167 | * unwinder with the next highest rating. | ||
168 | */ | ||
169 | BUILD_TRAP_HANDLER(unwinder) | ||
170 | { | ||
171 | insn_size_t insn; | ||
172 | TRAP_HANDLER_DECL; | ||
173 | |||
174 | /* Rewind */ | ||
175 | regs->pc -= instruction_size(ctrl_inw(regs->pc - 4)); | ||
176 | insn = *(insn_size_t *)instruction_pointer(regs); | ||
177 | |||
178 | /* Switch unwinders when unwind_stack() is called */ | ||
179 | unwinder_faulted = 1; | ||
180 | |||
181 | #ifdef CONFIG_BUG | ||
182 | handle_BUG(regs); | ||
183 | #endif | ||
184 | } | ||
185 | EXPORT_SYMBOL_GPL(unwind_stack); | 164 | EXPORT_SYMBOL_GPL(unwind_stack); |