aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/process.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/kernel/process.c')
-rw-r--r--arch/s390/kernel/process.c29
1 files changed, 1 insertions, 28 deletions
diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c
index 13fc0978ca7e..dc5edc29b73a 100644
--- a/arch/s390/kernel/process.c
+++ b/arch/s390/kernel/process.c
@@ -79,13 +79,11 @@ void release_thread(struct task_struct *dead_task)
79{ 79{
80} 80}
81 81
82#ifdef CONFIG_64BIT
83void arch_release_task_struct(struct task_struct *tsk) 82void arch_release_task_struct(struct task_struct *tsk)
84{ 83{
85 if (tsk->thread.vxrs) 84 if (tsk->thread.vxrs)
86 kfree(tsk->thread.vxrs); 85 kfree(tsk->thread.vxrs);
87} 86}
88#endif
89 87
90int copy_thread(unsigned long clone_flags, unsigned long new_stackp, 88int copy_thread(unsigned long clone_flags, unsigned long new_stackp,
91 unsigned long arg, struct task_struct *p) 89 unsigned long arg, struct task_struct *p)
@@ -144,19 +142,6 @@ int copy_thread(unsigned long clone_flags, unsigned long new_stackp,
144 p->thread.ri_signum = 0; 142 p->thread.ri_signum = 0;
145 frame->childregs.psw.mask &= ~PSW_MASK_RI; 143 frame->childregs.psw.mask &= ~PSW_MASK_RI;
146 144
147#ifndef CONFIG_64BIT
148 /*
149 * save fprs to current->thread.fp_regs to merge them with
150 * the emulated registers and then copy the result to the child.
151 */
152 save_fp_ctl(&current->thread.fp_regs.fpc);
153 save_fp_regs(current->thread.fp_regs.fprs);
154 memcpy(&p->thread.fp_regs, &current->thread.fp_regs,
155 sizeof(s390_fp_regs));
156 /* Set a new TLS ? */
157 if (clone_flags & CLONE_SETTLS)
158 p->thread.acrs[0] = frame->childregs.gprs[6];
159#else /* CONFIG_64BIT */
160 /* Save the fpu registers to new thread structure. */ 145 /* Save the fpu registers to new thread structure. */
161 save_fp_ctl(&p->thread.fp_regs.fpc); 146 save_fp_ctl(&p->thread.fp_regs.fpc);
162 save_fp_regs(p->thread.fp_regs.fprs); 147 save_fp_regs(p->thread.fp_regs.fprs);
@@ -172,15 +157,13 @@ int copy_thread(unsigned long clone_flags, unsigned long new_stackp,
172 p->thread.acrs[1] = (unsigned int)tls; 157 p->thread.acrs[1] = (unsigned int)tls;
173 } 158 }
174 } 159 }
175#endif /* CONFIG_64BIT */
176 return 0; 160 return 0;
177} 161}
178 162
179asmlinkage void execve_tail(void) 163asmlinkage void execve_tail(void)
180{ 164{
181 current->thread.fp_regs.fpc = 0; 165 current->thread.fp_regs.fpc = 0;
182 if (MACHINE_HAS_IEEE) 166 asm volatile("sfpc %0,%0" : : "d" (0));
183 asm volatile("sfpc %0,%0" : : "d" (0));
184} 167}
185 168
186/* 169/*
@@ -188,18 +171,8 @@ asmlinkage void execve_tail(void)
188 */ 171 */
189int dump_fpu (struct pt_regs * regs, s390_fp_regs *fpregs) 172int dump_fpu (struct pt_regs * regs, s390_fp_regs *fpregs)
190{ 173{
191#ifndef CONFIG_64BIT
192 /*
193 * save fprs to current->thread.fp_regs to merge them with
194 * the emulated registers and then copy the result to the dump.
195 */
196 save_fp_ctl(&current->thread.fp_regs.fpc);
197 save_fp_regs(current->thread.fp_regs.fprs);
198 memcpy(fpregs, &current->thread.fp_regs, sizeof(s390_fp_regs));
199#else /* CONFIG_64BIT */
200 save_fp_ctl(&fpregs->fpc); 174 save_fp_ctl(&fpregs->fpc);
201 save_fp_regs(fpregs->fprs); 175 save_fp_regs(fpregs->fprs);
202#endif /* CONFIG_64BIT */
203 return 1; 176 return 1;
204} 177}
205EXPORT_SYMBOL(dump_fpu); 178EXPORT_SYMBOL(dump_fpu);