Commit b380ab4f authored by Laura Abbott's avatar Laura Abbott Committed by Russell King

ARM: 7068/1: process: change from __backtrace to dump_stack in show_regs

Currently, show_regs calls __backtrace which does
nothing if CONFIG_FRAME_POINTER is not set. Switch to
dump_stack which handles both CONFIG_FRAME_POINTER and
CONFIG_ARM_UNWIND correctly.

__backtrace is now superseded by dump_stack in general
and show_regs was the last caller so remove __backtrace
as well.
Signed-off-by: default avatarLaura Abbott <lauraa@codeaurora.org>
Acked-by: default avatarNicolas Pitre <nicolas.pitre@linaro.org>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent b3377d18
...@@ -98,7 +98,6 @@ void hook_ifault_code(int nr, int (*fn)(unsigned long, unsigned int, ...@@ -98,7 +98,6 @@ void hook_ifault_code(int nr, int (*fn)(unsigned long, unsigned int,
#define xchg(ptr,x) \ #define xchg(ptr,x) \
((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))
extern asmlinkage void __backtrace(void);
extern asmlinkage void c_backtrace(unsigned long fp, int pmode); extern asmlinkage void c_backtrace(unsigned long fp, int pmode);
struct mm_struct; struct mm_struct;
......
...@@ -49,9 +49,6 @@ extern void __aeabi_ulcmp(void); ...@@ -49,9 +49,6 @@ extern void __aeabi_ulcmp(void);
extern void fpundefinstr(void); extern void fpundefinstr(void);
EXPORT_SYMBOL(__backtrace);
/* platform dependent support */ /* platform dependent support */
EXPORT_SYMBOL(__udelay); EXPORT_SYMBOL(__udelay);
EXPORT_SYMBOL(__const_udelay); EXPORT_SYMBOL(__const_udelay);
......
...@@ -319,7 +319,7 @@ void show_regs(struct pt_regs * regs) ...@@ -319,7 +319,7 @@ void show_regs(struct pt_regs * regs)
printk("\n"); printk("\n");
printk("Pid: %d, comm: %20s\n", task_pid_nr(current), current->comm); printk("Pid: %d, comm: %20s\n", task_pid_nr(current), current->comm);
__show_regs(regs); __show_regs(regs);
__backtrace(); dump_stack();
} }
ATOMIC_NOTIFIER_HEAD(thread_notify_head); ATOMIC_NOTIFIER_HEAD(thread_notify_head);
......
...@@ -22,15 +22,10 @@ ...@@ -22,15 +22,10 @@
#define mask r7 #define mask r7
#define offset r8 #define offset r8
ENTRY(__backtrace)
mov r1, #0x10
mov r0, fp
ENTRY(c_backtrace) ENTRY(c_backtrace)
#if !defined(CONFIG_FRAME_POINTER) || !defined(CONFIG_PRINTK) #if !defined(CONFIG_FRAME_POINTER) || !defined(CONFIG_PRINTK)
mov pc, lr mov pc, lr
ENDPROC(__backtrace)
ENDPROC(c_backtrace) ENDPROC(c_backtrace)
#else #else
stmfd sp!, {r4 - r8, lr} @ Save an extra register so we have a location... stmfd sp!, {r4 - r8, lr} @ Save an extra register so we have a location...
...@@ -107,7 +102,6 @@ for_each_frame: tst frame, mask @ Check for address exceptions ...@@ -107,7 +102,6 @@ for_each_frame: tst frame, mask @ Check for address exceptions
mov r1, frame mov r1, frame
bl printk bl printk
no_frame: ldmfd sp!, {r4 - r8, pc} no_frame: ldmfd sp!, {r4 - r8, pc}
ENDPROC(__backtrace)
ENDPROC(c_backtrace) ENDPROC(c_backtrace)
.pushsection __ex_table,"a" .pushsection __ex_table,"a"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment