mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
arm64: stacktrace: Factor out backtrace initialisation
Some common code is required by each stacktrace user to initialise struct stackframe before the first call to unwind_frame(). In preparation for adding to the common code, this patch factors it out into a separate function start_backtrace(), and modifies the stacktrace callers appropriately. No functional change. Signed-off-by: Dave Martin <dave.martin@arm.com> [Mark: drop tsk argument, update more callsites] Signed-off-by: Mark Rutland <mark.rutland@arm.com> Reviewed-by: James Morse <james.morse@arm.com> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Will Deacon <will@kernel.org>
This commit is contained in:
parent
8caa6e2be7
commit
f3dcbe67ed
7 changed files with 30 additions and 42 deletions
|
@ -131,4 +131,14 @@ static inline bool on_accessible_stack(const struct task_struct *tsk,
|
|||
return false;
|
||||
}
|
||||
|
||||
static inline void start_backtrace(struct stackframe *frame,
|
||||
unsigned long fp, unsigned long pc)
|
||||
{
|
||||
frame->fp = fp;
|
||||
frame->pc = pc;
|
||||
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
|
||||
frame->graph = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif /* __ASM_STACKTRACE_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue