diff options
author | Kefeng Wang <wangkefeng.wang@huawei.com> | 2020-11-13 07:42:21 +0100 |
---|---|---|
committer | Palmer Dabbelt <palmerdabbelt@google.com> | 2020-11-21 03:53:31 +0100 |
commit | 99c168fccbfedbc10ce1cb2dcb9eb790c478d833 (patch) | |
tree | 45e9d6509be0dde4bd45785e4f8a47d4583da31e /arch/riscv/kernel/stacktrace.c | |
parent | riscv: Add HAVE_IRQ_TIME_ACCOUNTING (diff) | |
download | linux-99c168fccbfedbc10ce1cb2dcb9eb790c478d833.tar.xz linux-99c168fccbfedbc10ce1cb2dcb9eb790c478d833.zip |
riscv: Cleanup stacktrace
1. add asm/stacktrace.h for walk_stackframe and struct stackframe
2. remove unnecessary blank lines in stacktrace.c
3. fix warning "no previous prototype for ‘fill_callchain’"
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Diffstat (limited to 'arch/riscv/kernel/stacktrace.c')
-rw-r--r-- | arch/riscv/kernel/stacktrace.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/arch/riscv/kernel/stacktrace.c b/arch/riscv/kernel/stacktrace.c index 595342910c3f..345a202c92bb 100644 --- a/arch/riscv/kernel/stacktrace.c +++ b/arch/riscv/kernel/stacktrace.c @@ -12,15 +12,12 @@ #include <linux/stacktrace.h> #include <linux/ftrace.h> +#include <asm/stacktrace.h> + register unsigned long sp_in_global __asm__("sp"); #ifdef CONFIG_FRAME_POINTER -struct stackframe { - unsigned long fp; - unsigned long ra; -}; - void notrace walk_stackframe(struct task_struct *task, struct pt_regs *regs, bool (*fn)(unsigned long, void *), void *arg) { @@ -96,7 +93,6 @@ void notrace walk_stackframe(struct task_struct *task, #endif /* CONFIG_FRAME_POINTER */ - static bool print_trace_address(unsigned long pc, void *arg) { const char *loglvl = arg; @@ -130,7 +126,6 @@ unsigned long get_wchan(struct task_struct *task) return pc; } - #ifdef CONFIG_STACKTRACE static bool __save_trace(unsigned long pc, void *arg, bool nosched) |