diff options
author | Vineet Gupta <vgupta@synopsys.com> | 2014-04-18 02:49:59 -0400 |
---|---|---|
committer | Vineet Gupta <vgupta@synopsys.com> | 2014-05-05 04:52:12 -0400 |
commit | 2ab402dfd65d15a4b25a8756272ababe3ef76884 (patch) | |
tree | 7b8535d6b2998744c5a4136c29e3c73048d3f2e0 /arch/arc/kernel | |
parent | d75386363ee60eb51c933c7b5e536f3a502ad7d7 (diff) |
ARC: make start_thread() out-of-line
Helps move out ISA specific bits from a arch exported header
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc/kernel')
-rw-r--r-- | arch/arc/kernel/process.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/arch/arc/kernel/process.c b/arch/arc/kernel/process.c index 07a3a968fe49..fdd89715d2d3 100644 --- a/arch/arc/kernel/process.c +++ b/arch/arc/kernel/process.c | |||
@@ -151,6 +151,29 @@ int copy_thread(unsigned long clone_flags, | |||
151 | } | 151 | } |
152 | 152 | ||
153 | /* | 153 | /* |
154 | * Do necessary setup to start up a new user task | ||
155 | */ | ||
156 | void start_thread(struct pt_regs * regs, unsigned long pc, unsigned long usp) | ||
157 | { | ||
158 | set_fs(USER_DS); /* user space */ | ||
159 | |||
160 | regs->sp = usp; | ||
161 | regs->ret = pc; | ||
162 | |||
163 | /* | ||
164 | * [U]ser Mode bit set | ||
165 | * [L] ZOL loop inhibited to begin with - cleared by a LP insn | ||
166 | * Interrupts enabled | ||
167 | */ | ||
168 | regs->status32 = STATUS_U_MASK | STATUS_L_MASK | | ||
169 | STATUS_E1_MASK | STATUS_E2_MASK; | ||
170 | |||
171 | /* bogus seed values for debugging */ | ||
172 | regs->lp_start = 0x10; | ||
173 | regs->lp_end = 0x80; | ||
174 | } | ||
175 | |||
176 | /* | ||
154 | * Some archs flush debug and FPU info here | 177 | * Some archs flush debug and FPU info here |
155 | */ | 178 | */ |
156 | void flush_thread(void) | 179 | void flush_thread(void) |