forked from luck/tmp_suning_uos_patched
arm64: Add dump_backtrace() in show_regs
Generic code expects show_regs() to dump the stack, but arm64's show_regs() does not. This makes it hard to debug softlockups and other issues that result in show_regs() being called. This patch updates arm64's show_regs() to dump the stack, as common code expects. Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com> [will: folded in bug_handler fix from mrutland] Signed-off-by: Will Deacon <will.deacon@arm.com>
This commit is contained in:
parent
c07ab957d9
commit
1149aad10b
|
@ -30,5 +30,6 @@ struct stackframe {
|
|||
extern int unwind_frame(struct task_struct *tsk, struct stackframe *frame);
|
||||
extern void walk_stackframe(struct task_struct *tsk, struct stackframe *frame,
|
||||
int (*fn)(struct stackframe *, void *), void *data);
|
||||
extern void dump_backtrace(struct pt_regs *regs, struct task_struct *tsk);
|
||||
|
||||
#endif /* __ASM_STACKTRACE_H */
|
||||
|
|
|
@ -210,6 +210,7 @@ void __show_regs(struct pt_regs *regs)
|
|||
void show_regs(struct pt_regs * regs)
|
||||
{
|
||||
__show_regs(regs);
|
||||
dump_backtrace(regs, NULL);
|
||||
}
|
||||
|
||||
static void tls_thread_flush(void)
|
||||
|
|
|
@ -140,7 +140,7 @@ static void dump_instr(const char *lvl, struct pt_regs *regs)
|
|||
}
|
||||
}
|
||||
|
||||
static void dump_backtrace(struct pt_regs *regs, struct task_struct *tsk)
|
||||
void dump_backtrace(struct pt_regs *regs, struct task_struct *tsk)
|
||||
{
|
||||
struct stackframe frame;
|
||||
unsigned long irq_stack_ptr;
|
||||
|
@ -728,8 +728,6 @@ static int bug_handler(struct pt_regs *regs, unsigned int esr)
|
|||
break;
|
||||
|
||||
case BUG_TRAP_TYPE_WARN:
|
||||
/* Ideally, report_bug() should backtrace for us... but no. */
|
||||
dump_backtrace(regs, NULL);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
Loading…
Reference in New Issue
Block a user