aboutsummaryrefslogtreecommitdiff
path: root/arch/riscv/include/asm
diff options
context:
space:
mode:
authorKefeng Wang <wangkefeng.wang@huawei.com>2020-11-13 14:42:21 +0800
committerPalmer Dabbelt <palmerdabbelt@google.com>2020-11-20 18:53:31 -0800
commit99c168fccbfedbc10ce1cb2dcb9eb790c478d833 (patch)
tree45e9d6509be0dde4bd45785e4f8a47d4583da31e /arch/riscv/include/asm
parent31564b8b6dbaf9035d27131982d3296c10742baa (diff)
downloadlinux-99c168fccbfedbc10ce1cb2dcb9eb790c478d833.tar.gz
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/include/asm')
-rw-r--r--arch/riscv/include/asm/stacktrace.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/riscv/include/asm/stacktrace.h b/arch/riscv/include/asm/stacktrace.h
new file mode 100644
index 000000000000..f09c1e31bde9
--- /dev/null
+++ b/arch/riscv/include/asm/stacktrace.h
@@ -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 */