diff options
Diffstat (limited to 'arch/arm/kernel/traps.c')
-rw-r--r-- | arch/arm/kernel/traps.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index f68ca0fb0ed7..57eb0f6f6005 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <asm/system.h> | 27 | #include <asm/system.h> |
28 | #include <asm/unistd.h> | 28 | #include <asm/unistd.h> |
29 | #include <asm/traps.h> | 29 | #include <asm/traps.h> |
30 | #include <asm/unwind.h> | ||
30 | 31 | ||
31 | #include "ptrace.h" | 32 | #include "ptrace.h" |
32 | #include "signal.h" | 33 | #include "signal.h" |
@@ -61,6 +62,7 @@ void dump_backtrace_entry(unsigned long where, unsigned long from, unsigned long | |||
61 | dump_mem("Exception stack", frame + 4, frame + 4 + sizeof(struct pt_regs)); | 62 | dump_mem("Exception stack", frame + 4, frame + 4 + sizeof(struct pt_regs)); |
62 | } | 63 | } |
63 | 64 | ||
65 | #ifndef CONFIG_ARM_UNWIND | ||
64 | /* | 66 | /* |
65 | * Stack pointers should always be within the kernels view of | 67 | * Stack pointers should always be within the kernels view of |
66 | * physical memory. If it is not there, then we can't dump | 68 | * physical memory. If it is not there, then we can't dump |
@@ -74,6 +76,7 @@ static int verify_stack(unsigned long sp) | |||
74 | 76 | ||
75 | return 0; | 77 | return 0; |
76 | } | 78 | } |
79 | #endif | ||
77 | 80 | ||
78 | /* | 81 | /* |
79 | * Dump out the contents of some memory nicely... | 82 | * Dump out the contents of some memory nicely... |
@@ -150,6 +153,12 @@ static void dump_instr(struct pt_regs *regs) | |||
150 | set_fs(fs); | 153 | set_fs(fs); |
151 | } | 154 | } |
152 | 155 | ||
156 | #ifdef CONFIG_ARM_UNWIND | ||
157 | static inline void dump_backtrace(struct pt_regs *regs, struct task_struct *tsk) | ||
158 | { | ||
159 | unwind_backtrace(regs, tsk); | ||
160 | } | ||
161 | #else | ||
153 | static void dump_backtrace(struct pt_regs *regs, struct task_struct *tsk) | 162 | static void dump_backtrace(struct pt_regs *regs, struct task_struct *tsk) |
154 | { | 163 | { |
155 | unsigned int fp, mode; | 164 | unsigned int fp, mode; |
@@ -184,6 +193,7 @@ static void dump_backtrace(struct pt_regs *regs, struct task_struct *tsk) | |||
184 | if (ok) | 193 | if (ok) |
185 | c_backtrace(fp, mode); | 194 | c_backtrace(fp, mode); |
186 | } | 195 | } |
196 | #endif | ||
187 | 197 | ||
188 | void dump_stack(void) | 198 | void dump_stack(void) |
189 | { | 199 | { |