diff options
Diffstat (limited to 'arch/frv/kernel/process.c')
-rw-r--r-- | arch/frv/kernel/process.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/frv/kernel/process.c b/arch/frv/kernel/process.c index e1e3aa196aa4..7e33215f1d8f 100644 --- a/arch/frv/kernel/process.c +++ b/arch/frv/kernel/process.c | |||
@@ -181,6 +181,9 @@ int copy_thread(unsigned long clone_flags, | |||
181 | childregs = (struct pt_regs *) | 181 | childregs = (struct pt_regs *) |
182 | (task_stack_page(p) + THREAD_SIZE - FRV_FRAME0_SIZE); | 182 | (task_stack_page(p) + THREAD_SIZE - FRV_FRAME0_SIZE); |
183 | 183 | ||
184 | /* set up the userspace frame (the only place that the USP is stored) */ | ||
185 | *childregs = *__kernel_frame0_ptr; | ||
186 | |||
184 | p->set_child_tid = p->clear_child_tid = NULL; | 187 | p->set_child_tid = p->clear_child_tid = NULL; |
185 | 188 | ||
186 | p->thread.frame = childregs; | 189 | p->thread.frame = childregs; |
@@ -191,10 +194,8 @@ int copy_thread(unsigned long clone_flags, | |||
191 | p->thread.frame0 = childregs; | 194 | p->thread.frame0 = childregs; |
192 | 195 | ||
193 | if (unlikely(!regs)) { | 196 | if (unlikely(!regs)) { |
194 | memset(childregs, 0, sizeof(struct pt_regs)); | ||
195 | childregs->gr9 = usp; /* function */ | 197 | childregs->gr9 = usp; /* function */ |
196 | childregs->gr8 = arg; | 198 | childregs->gr8 = arg; |
197 | childregs->psr = PSR_S; | ||
198 | p->thread.pc = (unsigned long) ret_from_kernel_thread; | 199 | p->thread.pc = (unsigned long) ret_from_kernel_thread; |
199 | save_user_regs(p->thread.user); | 200 | save_user_regs(p->thread.user); |
200 | return 0; | 201 | return 0; |