summaryrefslogtreecommitdiffstats
path: root/arch/arm64/kernel/return_address.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2020-09-14 16:34:08 +0100
committerWill Deacon <will@kernel.org>2020-09-18 14:24:16 +0100
commitbaa2cd417053cb674deb90ee66b88afea0517335 (patch)
tree9b02fe88c865f7f092af416073e25482b1c7467d /arch/arm64/kernel/return_address.c
parent264c03a245de7c5b1cc3836db45de6b991f877ca (diff)
downloadlinux-baa2cd417053cb674deb90ee66b88afea0517335.tar.bz2
arm64: stacktrace: Make stack walk callback consistent with generic code
As with the generic arch_stack_walk() code the arm64 stack walk code takes a callback that is called per stack frame. Currently the arm64 code always passes a struct stackframe to the callback and the generic code just passes the pc, however none of the users ever reference anything in the struct other than the pc value. The arm64 code also uses a return type of int while the generic code uses a return type of bool though in both cases the return value is a boolean value and the sense is inverted between the two. In order to reduce code duplication when arm64 is converted to use arch_stack_walk() change the signature and return sense of the arm64 specific callback to match that of the generic code. Signed-off-by: Mark Brown <broonie@kernel.org> Reviewed-by: Miroslav Benes <mbenes@suse.cz> Link: https://lore.kernel.org/r/20200914153409.25097-3-broonie@kernel.org Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'arch/arm64/kernel/return_address.c')
-rw-r--r--arch/arm64/kernel/return_address.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/arm64/kernel/return_address.c b/arch/arm64/kernel/return_address.c
index a5e8b3b9d798..a6d18755652f 100644
--- a/arch/arm64/kernel/return_address.c
+++ b/arch/arm64/kernel/return_address.c
@@ -18,16 +18,16 @@ struct return_address_data {
void *addr;
};
-static int save_return_addr(struct stackframe *frame, void *d)
+static bool save_return_addr(void *d, unsigned long pc)
{
struct return_address_data *data = d;
if (!data->level) {
- data->addr = (void *)frame->pc;
- return 1;
+ data->addr = (void *)pc;
+ return false;
} else {
--data->level;
- return 0;
+ return true;
}
}
NOKPROBE_SYMBOL(save_return_addr);