ARM: 8074/1: traps: Make use of the frame_pointer macro
Use the newly-introduced frame_pointer macro to extract the correct FP based on whether we are in THUMB2 mode or not. Signed-off-by: Nikolay Borisov <Nikolay.Borisov@arm.com> Acked-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
committed by
Russell King
parent
c8bee0ad78
commit
49432d4acf
@@ -31,11 +31,13 @@
|
|||||||
#include <asm/exception.h>
|
#include <asm/exception.h>
|
||||||
#include <asm/unistd.h>
|
#include <asm/unistd.h>
|
||||||
#include <asm/traps.h>
|
#include <asm/traps.h>
|
||||||
|
#include <asm/ptrace.h>
|
||||||
#include <asm/unwind.h>
|
#include <asm/unwind.h>
|
||||||
#include <asm/tls.h>
|
#include <asm/tls.h>
|
||||||
#include <asm/system_misc.h>
|
#include <asm/system_misc.h>
|
||||||
#include <asm/opcodes.h>
|
#include <asm/opcodes.h>
|
||||||
|
|
||||||
|
|
||||||
static const char *handler[]= {
|
static const char *handler[]= {
|
||||||
"prefetch abort",
|
"prefetch abort",
|
||||||
"data abort",
|
"data abort",
|
||||||
@@ -184,7 +186,7 @@ static void dump_backtrace(struct pt_regs *regs, struct task_struct *tsk)
|
|||||||
tsk = current;
|
tsk = current;
|
||||||
|
|
||||||
if (regs) {
|
if (regs) {
|
||||||
fp = regs->ARM_fp;
|
fp = frame_pointer(regs);
|
||||||
mode = processor_mode(regs);
|
mode = processor_mode(regs);
|
||||||
} else if (tsk != current) {
|
} else if (tsk != current) {
|
||||||
fp = thread_saved_fp(tsk);
|
fp = thread_saved_fp(tsk);
|
||||||
@@ -719,7 +721,7 @@ asmlinkage int arm_syscall(int no, struct pt_regs *regs)
|
|||||||
dump_instr("", regs);
|
dump_instr("", regs);
|
||||||
if (user_mode(regs)) {
|
if (user_mode(regs)) {
|
||||||
__show_regs(regs);
|
__show_regs(regs);
|
||||||
c_backtrace(regs->ARM_fp, processor_mode(regs));
|
c_backtrace(frame_pointer(regs), processor_mode(regs));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user