diff options
author | Hendrik Brueckner <brueckner@linux.vnet.ibm.com> | 2015-06-11 16:57:20 +0200 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2015-07-22 09:58:00 +0200 |
commit | 155e839a814834a3b4b31e729f4716e59d3d2dd4 (patch) | |
tree | e23d3bd009812c8a46caa418d42bf2a18ec6d39c /arch/s390/kernel/traps.c | |
parent | 904818e2f229f3d94ec95f6932a6358c81e73d78 (diff) |
s390/kernel: dynamically allocate FP register save area
Make the floating-point save area dynamically allocated and uses a flag
to distinguish whether a task uses floating-point or vector registers.
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/traps.c')
-rw-r--r-- | arch/s390/kernel/traps.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c index 97598d1876c7..7b09224c05a3 100644 --- a/arch/s390/kernel/traps.c +++ b/arch/s390/kernel/traps.c @@ -227,6 +227,7 @@ DO_ERROR_INFO(specification_exception, SIGILL, ILL_ILLOPN, int alloc_vector_registers(struct task_struct *tsk) { __vector128 *vxrs; + freg_t *fprs; /* Allocate vector register save area. */ vxrs = kzalloc(sizeof(__vector128) * __NUM_VXRS, @@ -238,7 +239,10 @@ int alloc_vector_registers(struct task_struct *tsk) save_fp_regs(tsk->thread.fpu.fprs); /* Copy the 16 floating point registers */ convert_fp_to_vx(vxrs, tsk->thread.fpu.fprs); + fprs = tsk->thread.fpu.fprs; tsk->thread.fpu.vxrs = vxrs; + tsk->thread.fpu.flags |= FPU_USE_VX; + kfree(fprs); if (tsk == current) { __ctl_set_bit(0, 17); restore_vx_regs(vxrs); |