From: Mina HuiMin-Chou <minachou@andestech.com>
To: <linux-riscv@lists.infradead.org>
Cc: <paul.walmsley@sifive.com>, <palmer@dabbelt.com>,
<aou@eecs.berkeley.edu>, <chenhuang5@huawei.com>,
<tim609@andestech.com>, <dylan@andestech.com>,
<minachou@andestech.com>, <az70021@gmail.com>
Subject: [PATCH] riscv: Move the "Call Trace" to dump_backrace().
Date: Tue, 18 Jul 2023 10:32:01 +0800 [thread overview]
Message-ID: <20230718023201.16018-1-minachou@andestech.com> (raw)
From: Hui Min Mina Chou <minachou@andestech.com>
It would be appropriate to show "Call Trace" within the dump_backtrace
function to ensure that some kernel dumps include this information.
This patch is based on Chen Huang's comment [1] and Palmer Dabbelt's
patch [2].
[1] https://lore.kernel.org/lkml/mhng-75c14e1e-a23c-404b-a1f6-235e53bdb6f3@palmerdabbelt-glaptop/
[2] https://lore.kernel.org/lkml/20220419174842.488-1-palmer@rivosinc.com/
Signed-off-by: Hui Min Mina Chou <minachou@andestech.com>
---
arch/riscv/kernel/stacktrace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/riscv/kernel/stacktrace.c b/arch/riscv/kernel/stacktrace.c
index 64a9c093aef9..ff136031a592 100644
--- a/arch/riscv/kernel/stacktrace.c
+++ b/arch/riscv/kernel/stacktrace.c
@@ -118,12 +118,12 @@ static bool print_trace_address(void *arg, unsigned long pc)
noinline void dump_backtrace(struct pt_regs *regs, struct task_struct *task,
const char *loglvl)
{
+ pr_cont("%sCall Trace:\n", loglvl);
walk_stackframe(task, regs, print_trace_address, (void *)loglvl);
}
void show_stack(struct task_struct *task, unsigned long *sp, const char *loglvl)
{
- pr_cont("%sCall Trace:\n", loglvl);
dump_backtrace(NULL, task, loglvl);
}
--
2.34.1
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next reply other threads:[~2023-07-19 6:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-18 2:32 Mina HuiMin-Chou [this message]
2023-07-24 7:57 ` [PATCH] riscv: Move the "Call Trace" to dump_backrace() Conor Dooley
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=20230718023201.16018-1-minachou@andestech.com \
--to=minachou@andestech.com \
--cc=aou@eecs.berkeley.edu \
--cc=az70021@gmail.com \
--cc=chenhuang5@huawei.com \
--cc=dylan@andestech.com \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=tim609@andestech.com \
/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).