arm: socfpga: Add clock for smp_twd timer
[linux-2.6.git] / arch / xtensa / include / asm / stacktrace.h
blob6a05fcb0a20de444d05d0706ff49795e0028ea94
1 /*
2 * arch/xtensa/include/asm/stacktrace.h
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details.
8 * Copyright (C) 2001 - 2013 Tensilica Inc.
9 */
10 #ifndef _XTENSA_STACKTRACE_H
11 #define _XTENSA_STACKTRACE_H
13 #include <linux/sched.h>
15 struct stackframe {
16 unsigned long pc;
17 unsigned long sp;
20 static __always_inline unsigned long *stack_pointer(struct task_struct *task)
22 unsigned long *sp;
24 if (!task || task == current)
25 __asm__ __volatile__ ("mov %0, a1\n" : "=a"(sp));
26 else
27 sp = (unsigned long *)task->thread.sp;
29 return sp;
32 void walk_stackframe(unsigned long *sp,
33 int (*fn)(struct stackframe *frame, void *data),
34 void *data);
36 #endif /* _XTENSA_STACKTRACE_H */