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:
committed by
Palmer Dabbelt
parent
31564b8b6d
commit
99c168fccb
17
arch/riscv/include/asm/stacktrace.h
Normal file
17
arch/riscv/include/asm/stacktrace.h
Normal 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 */
|
||||
Reference in New Issue
Block a user