arm64: stacktrace: Factor out backtrace initialisation
authorDave Martin <Dave.Martin@arm.com>
Tue, 2 Jul 2019 13:07:28 +0000 (14:07 +0100)
committerWill Deacon <will@kernel.org>
Mon, 22 Jul 2019 10:44:08 +0000 (11:44 +0100)
commitf3dcbe67ed424f1cf92065f9ad0cc647f2b44eac
tree6838d2a529abca0a3286e442e4b316605fc84f03
parent8caa6e2be72313c170f2b30e8475323526dd7ed1
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>
arch/arm64/include/asm/stacktrace.h
arch/arm64/kernel/perf_callchain.c
arch/arm64/kernel/process.c
arch/arm64/kernel/return_address.c
arch/arm64/kernel/stacktrace.c
arch/arm64/kernel/time.c
arch/arm64/kernel/traps.c