summaryrefslogtreecommitdiff
path: root/arch/arm64/include/asm/stacktrace/common.h
diff options
context:
space:
mode:
authorMark Rutland <mark.rutland@arm.com>2022-09-01 14:06:44 +0100
committerCatalin Marinas <catalin.marinas@arm.com>2022-09-09 12:30:08 +0100
commitbd8abd68836b5c2b668afc4fb46d85d687779dec (patch)
treecdc7cc30a79620c8cb52a6aff901b05035bb3a08 /arch/arm64/include/asm/stacktrace/common.h
parentd1f684e46bbd43eac5c6fb00906c57425d7022a6 (diff)
arm64: stacktrace: remove stack type from fp translator
In subsequent patches we'll remove the stack_type enum, and move the FP translation logic out of the raw FP unwind code. In preparation for doing so, this patch removes the type parameter from the FP translation callback, and modifies kvm_nvhe_stack_kern_va() to determine the relevant stack directly. So that kvm_nvhe_stack_kern_va() can use the stackinfo_*() helpers, these are moved earlier in the file, but are not modified in any way. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland <mark.rutland@arm.com> Reviewed-by: Kalesh Singh <kaleshsingh@google.com> Reviewed-by: Madhavan T. Venkataraman <madvenka@linux.microsoft.com> Reviewed-by: Mark Brown <broonie@kernel.org> Cc: Fuad Tabba <tabba@google.com> Cc: Marc Zyngier <maz@kernel.org> Cc: Will Deacon <will@kernel.org> Link: https://lore.kernel.org/r/20220901130646.1316937-8-mark.rutland@arm.com Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/include/asm/stacktrace/common.h')
-rw-r--r--arch/arm64/include/asm/stacktrace/common.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/arm64/include/asm/stacktrace/common.h b/arch/arm64/include/asm/stacktrace/common.h
index 3c3bda34bb87..2f972441f572 100644
--- a/arch/arm64/include/asm/stacktrace/common.h
+++ b/arch/arm64/include/asm/stacktrace/common.h
@@ -113,14 +113,12 @@ static inline void unwind_init_common(struct unwind_state *state,
* pointer to a kernel address.
*
* @fp: the frame pointer to be updated to its kernel address.
- * @type: the stack type associated with frame pointer @fp
*
* Return: true if the VA can be translated, false otherwise.
*
* Upon success @fp is updated to the corresponding kernel virtual address.
*/
-typedef bool (*stack_trace_translate_fp_fn)(unsigned long *fp,
- enum stack_type type);
+typedef bool (*stack_trace_translate_fp_fn)(unsigned long *fp);
/**
* typedef on_accessible_stack_fn() - Check whether a stack range is on any of
@@ -172,7 +170,7 @@ unwind_next_frame_record(struct unwind_state *state,
* If fp is not from the current address space perform the necessary
* translation before dereferencing it to get the next fp.
*/
- if (translate_fp && !translate_fp(&kern_fp, info.type))
+ if (translate_fp && !translate_fp(&kern_fp))
return -EINVAL;
/*