summaryrefslogtreecommitdiffstats
path: root/arch/csky/include
diff options
context:
space:
mode:
authorGuo Ren2018-12-09 07:18:05 +0100
committerGuo Ren2018-12-31 16:12:22 +0100
commit0ea2dc7cd668be5475babecaf6fdeaa464e2847b (patch)
tree733fef9d2126b7323d4ec80e62e0c3ea583e01f7 /arch/csky/include
parentcsky: CPU-hotplug supported for SMP (diff)
downloadkernel-qcow2-linux-0ea2dc7cd668be5475babecaf6fdeaa464e2847b.tar.gz
kernel-qcow2-linux-0ea2dc7cd668be5475babecaf6fdeaa464e2847b.tar.xz
kernel-qcow2-linux-0ea2dc7cd668be5475babecaf6fdeaa464e2847b.zip
csky: stacktrace supported.
The gcc option "-mbacktrace" will push fp(r8),lr into stack and we could unwind the stack with: fp = *fp lr = (unsigned int *)fp[1] Signed-off-by: Guo Ren <ren_guo@c-sky.com>
Diffstat (limited to 'arch/csky/include')
-rw-r--r--arch/csky/include/asm/thread_info.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/csky/include/asm/thread_info.h b/arch/csky/include/asm/thread_info.h
index a2c69a7836f7..0e9d035d712b 100644
--- a/arch/csky/include/asm/thread_info.h
+++ b/arch/csky/include/asm/thread_info.h
@@ -10,6 +10,7 @@
#include <asm/types.h>
#include <asm/page.h>
#include <asm/processor.h>
+#include <abi/switch_context.h>
struct thread_info {
struct task_struct *task;
@@ -36,6 +37,9 @@ struct thread_info {
#define THREAD_SIZE_ORDER (THREAD_SHIFT - PAGE_SHIFT)
+#define thread_saved_fp(tsk) \
+ ((unsigned long)(((struct switch_stack *)(tsk->thread.ksp))->r8))
+
static inline struct thread_info *current_thread_info(void)
{
unsigned long sp;