diff options
Diffstat (limited to 'arch/arc/include/asm/processor.h')
-rw-r--r-- | arch/arc/include/asm/processor.h | 29 |
1 files changed, 4 insertions, 25 deletions
diff --git a/arch/arc/include/asm/processor.h b/arch/arc/include/asm/processor.h index 15334ab66b56..d99f9b37cd15 100644 --- a/arch/arc/include/asm/processor.h +++ b/arch/arc/include/asm/processor.h | |||
@@ -18,7 +18,6 @@ | |||
18 | 18 | ||
19 | #ifndef __ASSEMBLY__ | 19 | #ifndef __ASSEMBLY__ |
20 | 20 | ||
21 | #include <asm/arcregs.h> /* for STATUS_E1_MASK et all */ | ||
22 | #include <asm/ptrace.h> | 21 | #include <asm/ptrace.h> |
23 | 22 | ||
24 | /* Arch specific stuff which needs to be saved per task. | 23 | /* Arch specific stuff which needs to be saved per task. |
@@ -41,15 +40,13 @@ struct thread_struct { | |||
41 | /* Forward declaration, a strange C thing */ | 40 | /* Forward declaration, a strange C thing */ |
42 | struct task_struct; | 41 | struct task_struct; |
43 | 42 | ||
44 | /* | 43 | /* Return saved PC of a blocked thread */ |
45 | * Return saved PC of a blocked thread. | ||
46 | */ | ||
47 | unsigned long thread_saved_pc(struct task_struct *t); | 44 | unsigned long thread_saved_pc(struct task_struct *t); |
48 | 45 | ||
49 | #define task_pt_regs(p) \ | 46 | #define task_pt_regs(p) \ |
50 | ((struct pt_regs *)(THREAD_SIZE + (void *)task_stack_page(p)) - 1) | 47 | ((struct pt_regs *)(THREAD_SIZE + (void *)task_stack_page(p)) - 1) |
51 | 48 | ||
52 | /* Free all resources held by a thread. */ | 49 | /* Free all resources held by a thread */ |
53 | #define release_thread(thread) do { } while (0) | 50 | #define release_thread(thread) do { } while (0) |
54 | 51 | ||
55 | /* Prepare to copy thread state - unlazy all lazy status */ | 52 | /* Prepare to copy thread state - unlazy all lazy status */ |
@@ -82,26 +79,8 @@ unsigned long thread_saved_pc(struct task_struct *t); | |||
82 | #define KSTK_BLINK(tsk) KSTK_REG(tsk, 4) | 79 | #define KSTK_BLINK(tsk) KSTK_REG(tsk, 4) |
83 | #define KSTK_FP(tsk) KSTK_REG(tsk, 0) | 80 | #define KSTK_FP(tsk) KSTK_REG(tsk, 0) |
84 | 81 | ||
85 | /* | 82 | extern void start_thread(struct pt_regs * regs, unsigned long pc, |
86 | * Do necessary setup to start up a newly executed thread. | 83 | unsigned long usp); |
87 | * | ||
88 | * E1,E2 so that Interrupts are enabled in user mode | ||
89 | * L set, so Loop inhibited to begin with | ||
90 | * lp_start and lp_end seeded with bogus non-zero values so to easily catch | ||
91 | * the ARC700 sr to lp_start hardware bug | ||
92 | */ | ||
93 | #define start_thread(_regs, _pc, _usp) \ | ||
94 | do { \ | ||
95 | set_fs(USER_DS); /* reads from user space */ \ | ||
96 | (_regs)->ret = (_pc); \ | ||
97 | /* Interrupts enabled in User Mode */ \ | ||
98 | (_regs)->status32 = STATUS_U_MASK | STATUS_L_MASK \ | ||
99 | | STATUS_E1_MASK | STATUS_E2_MASK; \ | ||
100 | (_regs)->sp = (_usp); \ | ||
101 | /* bogus seed values for debugging */ \ | ||
102 | (_regs)->lp_start = 0x10; \ | ||
103 | (_regs)->lp_end = 0x80; \ | ||
104 | } while (0) | ||
105 | 84 | ||
106 | extern unsigned int get_wchan(struct task_struct *p); | 85 | extern unsigned int get_wchan(struct task_struct *p); |
107 | 86 | ||