From: wangkefeng.wang@huawei.com (Kefeng Wang)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] arm64: Add dump_backtrace() in show_regs
Date: Mon, 8 May 2017 21:56:55 +0800 [thread overview]
Message-ID: <1494251815-55961-2-git-send-email-wangkefeng.wang@huawei.com> (raw)
In-Reply-To: <1494251815-55961-1-git-send-email-wangkefeng.wang@huawei.com>
When the system trigger a softlockup(eg, infinite loop when
PREEMPT_NONE), it only shows regs without stack trace, which
makes it difficult to adress the issue.
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
arch/arm64/include/asm/stacktrace.h | 1 +
arch/arm64/kernel/process.c | 1 +
arch/arm64/kernel/traps.c | 2 +-
3 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/include/asm/stacktrace.h b/arch/arm64/include/asm/stacktrace.h
index 801a16db..5b6eafc 100644
--- a/arch/arm64/include/asm/stacktrace.h
+++ b/arch/arm64/include/asm/stacktrace.h
@@ -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 */
diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c
index ae2a835..af1ea25 100644
--- a/arch/arm64/kernel/process.c
+++ b/arch/arm64/kernel/process.c
@@ -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)
diff --git a/arch/arm64/kernel/traps.c b/arch/arm64/kernel/traps.c
index d4d6ae0..368c3c8 100644
--- a/arch/arm64/kernel/traps.c
+++ b/arch/arm64/kernel/traps.c
@@ -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;
--
1.7.12.4
next prev parent reply other threads:[~2017-05-08 13:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-08 13:56 [PATCH 1/2] arm64: Call __show_regs directly Kefeng Wang
2017-05-08 13:56 ` Kefeng Wang [this message]
2017-05-08 15:04 ` [PATCH 2/2] arm64: Add dump_backtrace() in show_regs Mark Rutland
2017-05-09 1:23 ` Kefeng Wang
2017-05-08 14:55 ` [PATCH 1/2] arm64: Call __show_regs directly Mark Rutland
2017-05-09 1:53 ` [PATCH v2 " Kefeng Wang
2017-05-09 1:53 ` [PATCH v2 2/2] arm64: Add dump_backtrace() in show_regs Kefeng Wang
2017-05-24 10:09 ` Mark Rutland
2017-05-25 10:58 ` Will Deacon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1494251815-55961-2-git-send-email-wangkefeng.wang@huawei.com \
--to=wangkefeng.wang@huawei.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).