riscv: Add dump stack in show_regs

Like commit 1149aad10b ("arm64: Add dump_backtrace() in show_regs"),
dump the stack in riscv show_regs as common code expects.

Reviewed-by: Atish Patra <atish.patra@wdc.com>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
This commit is contained in:
Kefeng Wang
2021-01-11 20:40:12 +08:00
committed by Palmer Dabbelt
parent fea2fed201
commit 091b945085
5 changed files with 21 additions and 4 deletions

View File

@@ -17,6 +17,7 @@
#include <linux/module.h>
#include <linux/irq.h>
#include <asm/bug.h>
#include <asm/processor.h>
#include <asm/ptrace.h>
#include <asm/csr.h>
@@ -67,7 +68,7 @@ void do_trap(struct pt_regs *regs, int signo, int code, unsigned long addr)
tsk->comm, task_pid_nr(tsk), signo, code, addr);
print_vma_addr(KERN_CONT " in ", instruction_pointer(regs));
pr_cont("\n");
show_regs(regs);
__show_regs(regs);
}
force_sig_fault(signo, code, (void __user *)addr);