summaryrefslogtreecommitdiffstats
path: root/arch/arm64/kernel/perf_callchain.c
diff options
context:
space:
mode:
authorDave Martin <Dave.Martin@arm.com>2019-07-02 14:07:28 +0100
committerWill Deacon <will@kernel.org>2019-07-22 11:44:08 +0100
commitf3dcbe67ed424f1cf92065f9ad0cc647f2b44eac (patch)
tree6838d2a529abca0a3286e442e4b316605fc84f03 /arch/arm64/kernel/perf_callchain.c
parent8caa6e2be72313c170f2b30e8475323526dd7ed1 (diff)
downloadlinux-f3dcbe67ed424f1cf92065f9ad0cc647f2b44eac.tar.gz
linux-f3dcbe67ed424f1cf92065f9ad0cc647f2b44eac.tar.bz2
linux-f3dcbe67ed424f1cf92065f9ad0cc647f2b44eac.zip
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>
Diffstat (limited to 'arch/arm64/kernel/perf_callchain.c')
-rw-r--r--arch/arm64/kernel/perf_callchain.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/arch/arm64/kernel/perf_callchain.c b/arch/arm64/kernel/perf_callchain.c
index 9d63514b9836..b0e03e052dd1 100644
--- a/arch/arm64/kernel/perf_callchain.c
+++ b/arch/arm64/kernel/perf_callchain.c
@@ -154,12 +154,7 @@ void perf_callchain_kernel(struct perf_callchain_entry_ctx *entry,
return;
}
- frame.fp = regs->regs[29];
- frame.pc = regs->pc;
-#ifdef CONFIG_FUNCTION_GRAPH_TRACER
- frame.graph = 0;
-#endif
-
+ start_backtrace(&frame, regs->regs[29], regs->pc);
walk_stackframe(current, &frame, callchain_trace, entry);
}