From: Russell King Date: Sun, 22 Dec 2019 16:39:40 +0000 (+0000) Subject: ARM: allow unwinder to unwind recursive functions X-Git-Tag: v5.15~4163^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8d54a27593896895f6166a1ac69eac99c8a6a71a;p=platform%2Fkernel%2Flinux-starfive.git ARM: allow unwinder to unwind recursive functions Allow the unwinder to unwind recursive functions if the stack makes progress, even if the PC is the same. This allows tracing through recursive __switchdev_handle_port_attr_set() and similar. Signed-off-by: Russell King --- diff --git a/arch/arm/kernel/unwind.c b/arch/arm/kernel/unwind.c index 4574e6a..11a964f 100644 --- a/arch/arm/kernel/unwind.c +++ b/arch/arm/kernel/unwind.c @@ -444,7 +444,7 @@ int unwind_frame(struct stackframe *frame) ctrl.vrs[PC] = ctrl.vrs[LR]; /* check for infinite loop */ - if (frame->pc == ctrl.vrs[PC]) + if (frame->pc == ctrl.vrs[PC] && frame->sp == ctrl.vrs[SP]) return -URC_FAILURE; frame->fp = ctrl.vrs[FP];