aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/include
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2009-02-11 07:07:53 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-02-12 08:21:17 -0500
commit2d7c11bfc91637e5f9bc5f8c9a82aaffcc0e97aa (patch)
tree0bb67dae38b1185089b6c9813769689cb79c5ee3 /arch/arm/include
parent67a94c23bb7338c321ae71aa33f8d398c94e1d0c (diff)
[ARM] 5382/1: unwind: Reorganise the stacktrace support
This patch changes the walk_stacktrace and its callers for easier integration of stack unwinding. The arch/arm/kernel/stacktrace.h file is also moved to arch/arm/include/asm/stacktrace.h. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/include')
-rw-r--r--arch/arm/include/asm/stacktrace.h15
-rw-r--r--arch/arm/include/asm/thread_info.h2
2 files changed, 17 insertions, 0 deletions
diff --git a/arch/arm/include/asm/stacktrace.h b/arch/arm/include/asm/stacktrace.h
new file mode 100644
index 00000000000..4d0a16441b2
--- /dev/null
+++ b/arch/arm/include/asm/stacktrace.h
@@ -0,0 +1,15 @@
1#ifndef __ASM_STACKTRACE_H
2#define __ASM_STACKTRACE_H
3
4struct stackframe {
5 unsigned long fp;
6 unsigned long sp;
7 unsigned long lr;
8 unsigned long pc;
9};
10
11extern int unwind_frame(struct stackframe *frame);
12extern void walk_stackframe(struct stackframe *frame,
13 int (*fn)(struct stackframe *, void *), void *data);
14
15#endif /* __ASM_STACKTRACE_H */
diff --git a/arch/arm/include/asm/thread_info.h b/arch/arm/include/asm/thread_info.h
index b9dc8a84257..4f8848260ee 100644
--- a/arch/arm/include/asm/thread_info.h
+++ b/arch/arm/include/asm/thread_info.h
@@ -99,6 +99,8 @@ static inline struct thread_info *current_thread_info(void)
99 99
100#define thread_saved_pc(tsk) \ 100#define thread_saved_pc(tsk) \
101 ((unsigned long)(task_thread_info(tsk)->cpu_context.pc)) 101 ((unsigned long)(task_thread_info(tsk)->cpu_context.pc))
102#define thread_saved_sp(tsk) \
103 ((unsigned long)(task_thread_info(tsk)->cpu_context.sp))
102#define thread_saved_fp(tsk) \ 104#define thread_saved_fp(tsk) \
103 ((unsigned long)(task_thread_info(tsk)->cpu_context.fp)) 105 ((unsigned long)(task_thread_info(tsk)->cpu_context.fp))
104 106