1818
1919#ifndef __ASSEMBLY__
2020
21- #include <asm/arcregs.h> /* for STATUS_E1_MASK et all */
2221#include <asm/ptrace.h>
2322
2423/* Arch specific stuff which needs to be saved per task.
@@ -41,15 +40,13 @@ struct thread_struct {
4140/* Forward declaration, a strange C thing */
4241struct task_struct ;
4342
44- /*
45- * Return saved PC of a blocked thread.
46- */
43+ /* Return saved PC of a blocked thread */
4744unsigned long thread_saved_pc (struct task_struct * t );
4845
4946#define task_pt_regs (p ) \
5047 ((struct pt_regs *)(THREAD_SIZE + (void *)task_stack_page(p)) - 1)
5148
52- /* Free all resources held by a thread. */
49+ /* Free all resources held by a thread */
5350#define release_thread (thread ) do { } while (0)
5451
5552/* Prepare to copy thread state - unlazy all lazy status */
@@ -82,26 +79,8 @@ unsigned long thread_saved_pc(struct task_struct *t);
8279#define KSTK_BLINK (tsk ) KSTK_REG(tsk, 4)
8380#define KSTK_FP (tsk ) KSTK_REG(tsk, 0)
8481
85- /*
86- * Do necessary setup to start up a newly executed thread.
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 )
82+ extern void start_thread (struct pt_regs * regs , unsigned long pc ,
83+ unsigned long usp );
10584
10685extern unsigned int get_wchan (struct task_struct * p );
10786
0 commit comments