diff options
author | Li Huafei <lihuafei1@huawei.com> | 2022-10-18 14:57:02 +0200 |
---|---|---|
committer | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2022-11-08 19:36:18 +0100 |
commit | 70ccc7c0667ba8a39dab274b3836b063a6b4ecf9 (patch) | |
tree | d539a9ed525eb32a3f3d0434f2749901829cfe4e /arch/arm/kernel/perf_callchain.c | |
parent | ARM: 9265/1: pass -march= only to compiler (diff) | |
download | linux-70ccc7c0667ba8a39dab274b3836b063a6b4ecf9.tar.xz linux-70ccc7c0667ba8a39dab274b3836b063a6b4ecf9.zip |
ARM: 9258/1: stacktrace: Make stack walk callback consistent with generic code
As with the generic arch_stack_walk() code the ARM stack walk code takes
a callback that is called per stack frame. Currently the ARM 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 ARM 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 ARM is converted to use
arch_stack_walk() change the signature and return sense of the ARM
specific callback to match that of the generic code.
Signed-off-by: Li Huafei <lihuafei1@huawei.com>
Reviewed-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Linus Waleij <linus.walleij@linaro.org>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'arch/arm/kernel/perf_callchain.c')
-rw-r--r-- | arch/arm/kernel/perf_callchain.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/arch/arm/kernel/perf_callchain.c b/arch/arm/kernel/perf_callchain.c index bc6b246ab55e..7147edbe56c6 100644 --- a/arch/arm/kernel/perf_callchain.c +++ b/arch/arm/kernel/perf_callchain.c @@ -81,13 +81,12 @@ perf_callchain_user(struct perf_callchain_entry_ctx *entry, struct pt_regs *regs * whist unwinding the stackframe and is like a subroutine return so we use * the PC. */ -static int -callchain_trace(struct stackframe *fr, - void *data) +static bool +callchain_trace(void *data, unsigned long pc) { struct perf_callchain_entry_ctx *entry = data; - perf_callchain_store(entry, fr->pc); - return 0; + perf_callchain_store(entry, pc); + return true; } void |