diff options
Diffstat (limited to 'arch/sh/kernel/process_32.c')
-rw-r--r-- | arch/sh/kernel/process_32.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/arch/sh/kernel/process_32.c b/arch/sh/kernel/process_32.c index ddafbbbab2ab..6d94725d22f2 100644 --- a/arch/sh/kernel/process_32.c +++ b/arch/sh/kernel/process_32.c | |||
@@ -170,20 +170,32 @@ int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpu) | |||
170 | 170 | ||
171 | asmlinkage void ret_from_fork(void); | 171 | asmlinkage void ret_from_fork(void); |
172 | 172 | ||
173 | int copy_thread(int nr, unsigned long clone_flags, unsigned long usp, | 173 | int copy_thread(unsigned long clone_flags, unsigned long usp, |
174 | unsigned long unused, | 174 | unsigned long unused, |
175 | struct task_struct *p, struct pt_regs *regs) | 175 | struct task_struct *p, struct pt_regs *regs) |
176 | { | 176 | { |
177 | struct thread_info *ti = task_thread_info(p); | 177 | struct thread_info *ti = task_thread_info(p); |
178 | struct pt_regs *childregs; | 178 | struct pt_regs *childregs; |
179 | #if defined(CONFIG_SH_FPU) | 179 | #if defined(CONFIG_SH_FPU) || defined(CONFIG_SH_DSP) |
180 | struct task_struct *tsk = current; | 180 | struct task_struct *tsk = current; |
181 | #endif | ||
181 | 182 | ||
183 | #if defined(CONFIG_SH_FPU) | ||
182 | unlazy_fpu(tsk, regs); | 184 | unlazy_fpu(tsk, regs); |
183 | p->thread.fpu = tsk->thread.fpu; | 185 | p->thread.fpu = tsk->thread.fpu; |
184 | copy_to_stopped_child_used_math(p); | 186 | copy_to_stopped_child_used_math(p); |
185 | #endif | 187 | #endif |
186 | 188 | ||
189 | #if defined(CONFIG_SH_DSP) | ||
190 | if (is_dsp_enabled(tsk)) { | ||
191 | /* We can use the __save_dsp or just copy the struct: | ||
192 | * __save_dsp(p); | ||
193 | * p->thread.dsp_status.status |= SR_DSP | ||
194 | */ | ||
195 | p->thread.dsp_status = tsk->thread.dsp_status; | ||
196 | } | ||
197 | #endif | ||
198 | |||
187 | childregs = task_pt_regs(p); | 199 | childregs = task_pt_regs(p); |
188 | *childregs = *regs; | 200 | *childregs = *regs; |
189 | 201 | ||