aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arc/include/asm/processor.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arc/include/asm/processor.h')
-rw-r--r--arch/arc/include/asm/processor.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/arch/arc/include/asm/processor.h b/arch/arc/include/asm/processor.h
index 5f26b2c1cba0..15334ab66b56 100644
--- a/arch/arc/include/asm/processor.h
+++ b/arch/arc/include/asm/processor.h
@@ -19,6 +19,7 @@
19#ifndef __ASSEMBLY__ 19#ifndef __ASSEMBLY__
20 20
21#include <asm/arcregs.h> /* for STATUS_E1_MASK et all */ 21#include <asm/arcregs.h> /* for STATUS_E1_MASK et all */
22#include <asm/ptrace.h>
22 23
23/* Arch specific stuff which needs to be saved per task. 24/* Arch specific stuff which needs to be saved per task.
24 * However these items are not so important so as to earn a place in 25 * However these items are not so important so as to earn a place in
@@ -28,10 +29,6 @@ struct thread_struct {
28 unsigned long ksp; /* kernel mode stack pointer */ 29 unsigned long ksp; /* kernel mode stack pointer */
29 unsigned long callee_reg; /* pointer to callee regs */ 30 unsigned long callee_reg; /* pointer to callee regs */
30 unsigned long fault_address; /* dbls as brkpt holder as well */ 31 unsigned long fault_address; /* dbls as brkpt holder as well */
31 unsigned long cause_code; /* Exception Cause Code (ECR) */
32#ifdef CONFIG_ARC_CURR_IN_REG
33 unsigned long user_r25;
34#endif
35#ifdef CONFIG_ARC_FPU_SAVE_RESTORE 32#ifdef CONFIG_ARC_FPU_SAVE_RESTORE
36 struct arc_fpu fpu; 33 struct arc_fpu fpu;
37#endif 34#endif
@@ -50,7 +47,7 @@ struct task_struct;
50unsigned long thread_saved_pc(struct task_struct *t); 47unsigned long thread_saved_pc(struct task_struct *t);
51 48
52#define task_pt_regs(p) \ 49#define task_pt_regs(p) \
53 ((struct pt_regs *)(THREAD_SIZE - 4 + (void *)task_stack_page(p)) - 1) 50 ((struct pt_regs *)(THREAD_SIZE + (void *)task_stack_page(p)) - 1)
54 51
55/* Free all resources held by a thread. */ 52/* Free all resources held by a thread. */
56#define release_thread(thread) do { } while (0) 53#define release_thread(thread) do { } while (0)
@@ -75,11 +72,15 @@ unsigned long thread_saved_pc(struct task_struct *t);
75 72
76/* 73/*
77 * Where abouts of Task's sp, fp, blink when it was last seen in kernel mode. 74 * Where abouts of Task's sp, fp, blink when it was last seen in kernel mode.
78 * These can't be derived from pt_regs as that would give correp user-mode val 75 * Look in process.c for details of kernel stack layout
79 */ 76 */
80#define KSTK_ESP(tsk) (tsk->thread.ksp) 77#define KSTK_ESP(tsk) (tsk->thread.ksp)
81#define KSTK_BLINK(tsk) (*((unsigned int *)((KSTK_ESP(tsk)) + (13+1+1)*4))) 78
82#define KSTK_FP(tsk) (*((unsigned int *)((KSTK_ESP(tsk)) + (13+1)*4))) 79#define KSTK_REG(tsk, off) (*((unsigned int *)(KSTK_ESP(tsk) + \
80 sizeof(struct callee_regs) + off)))
81
82#define KSTK_BLINK(tsk) KSTK_REG(tsk, 4)
83#define KSTK_FP(tsk) KSTK_REG(tsk, 0)
83 84
84/* 85/*
85 * Do necessary setup to start up a newly executed thread. 86 * Do necessary setup to start up a newly executed thread.