summaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/process.c
diff options
context:
space:
mode:
authorHendrik Brueckner <brueckner@linux.vnet.ibm.com>2015-06-11 15:33:54 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2015-07-22 09:58:00 +0200
commit904818e2f229f3d94ec95f6932a6358c81e73d78 (patch)
tree8e08f576b000b18b181b617cd0d12a6649a26556 /arch/s390/kernel/process.c
parent96b2d7a83a27fbae10fc57c39577a7e2689d9f0a (diff)
downloadop-kernel-dev-904818e2f229f3d94ec95f6932a6358c81e73d78.zip
op-kernel-dev-904818e2f229f3d94ec95f6932a6358c81e73d78.tar.gz
s390/kernel: introduce fpu-internal.h with fpu helper functions
Introduce a new structure to manage FP and VX registers. Refactor the save and restore of floating point and vector registers with a set of helper functions in fpu-internal.h. Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/process.c')
-rw-r--r--arch/s390/kernel/process.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c
index 8f587d8..61795bc 100644
--- a/arch/s390/kernel/process.c
+++ b/arch/s390/kernel/process.c
@@ -81,8 +81,8 @@ void release_thread(struct task_struct *dead_task)
void arch_release_task_struct(struct task_struct *tsk)
{
- if (tsk->thread.vxrs)
- kfree(tsk->thread.vxrs);
+ if (is_vx_task(tsk))
+ kfree(tsk->thread.fpu.vxrs);
}
int copy_thread(unsigned long clone_flags, unsigned long new_stackp,
@@ -143,10 +143,10 @@ int copy_thread(unsigned long clone_flags, unsigned long new_stackp,
frame->childregs.psw.mask &= ~PSW_MASK_RI;
/* Save the fpu registers to new thread structure. */
- save_fp_ctl(&p->thread.fp_regs.fpc);
- save_fp_regs(p->thread.fp_regs.fprs);
- p->thread.fp_regs.pad = 0;
- p->thread.vxrs = NULL;
+ save_fp_ctl(&p->thread.fpu.fpc);
+ save_fp_regs(p->thread.fpu.fprs);
+ p->thread.fpu.pad = 0;
+ p->thread.fpu.vxrs = NULL;
/* Set a new TLS ? */
if (clone_flags & CLONE_SETTLS) {
unsigned long tls = frame->childregs.gprs[6];
@@ -162,7 +162,7 @@ int copy_thread(unsigned long clone_flags, unsigned long new_stackp,
asmlinkage void execve_tail(void)
{
- current->thread.fp_regs.fpc = 0;
+ current->thread.fpu.fpc = 0;
asm volatile("sfpc %0" : : "d" (0));
}
OpenPOWER on IntegriCloud