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>
This commit is contained in:
Kefeng Wang
2020-11-13 14:42:21 +08:00
committed by Palmer Dabbelt
parent 31564b8b6d
commit 99c168fccb
3 changed files with 21 additions and 15 deletions

View File

@@ -0,0 +1,17 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _ASM_RISCV_STACKTRACE_H
#define _ASM_RISCV_STACKTRACE_H
#include <linux/sched.h>
#include <asm/ptrace.h>
struct stackframe {
unsigned long fp;
unsigned long ra;
};
extern void notrace walk_stackframe(struct task_struct *task, struct pt_regs *regs,
bool (*fn)(unsigned long, void *), void *arg);
#endif /* _ASM_RISCV_STACKTRACE_H */