From: Nikolay Borisov Date: Tue, 3 Jun 2014 18:49:14 +0000 (+0100) Subject: ARM: 8073/1: unwind: Use arm_get_current_stackframe X-Git-Tag: firefly_0821_release~176^2~3485^2~2^2~21 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c8bee0ad78b2107ffb56fa82f0ab2b762311d172;p=firefly-linux-kernel-4.4.55.git ARM: 8073/1: unwind: Use arm_get_current_stackframe Make the unwind code use the correct API so that the frame pointer is extracted from the correct register. Signed-off-by: Nikolay Borisov Acked-by: Will Deacon Signed-off-by: Russell King --- diff --git a/arch/arm/kernel/unwind.c b/arch/arm/kernel/unwind.c index e67682f02cb2..a61a1dfbb0db 100644 --- a/arch/arm/kernel/unwind.c +++ b/arch/arm/kernel/unwind.c @@ -479,12 +479,10 @@ void unwind_backtrace(struct pt_regs *regs, struct task_struct *tsk) tsk = current; if (regs) { - frame.fp = regs->ARM_fp; - frame.sp = regs->ARM_sp; - frame.lr = regs->ARM_lr; + arm_get_current_stackframe(regs, &frame); /* PC might be corrupted, use LR in that case. */ - frame.pc = kernel_text_address(regs->ARM_pc) - ? regs->ARM_pc : regs->ARM_lr; + if (!kernel_text_address(regs->ARM_pc)) + frame.pc = regs->ARM_lr; } else if (tsk == current) { frame.fp = (unsigned long)__builtin_frame_address(0); frame.sp = current_sp;