s390/kernel: remove save_fpu_regs() parameter and use __LC_CURRENT instead
All calls to save_fpu_regs() specify the fpu structure of the current task pointer as parameter. The task pointer of the current task can also be retrieved from the CPU lowcore directly. Remove the parameter definition, load the __LC_CURRENT task pointer from the CPU lowcore, and rebase the FPU structure onto the task structure. Apply the same approach for the load_fpu_regs() function. Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:

committed by
Martin Schwidefsky

parent
2a01bd1bd3
commit
d0164ee20d
@@ -236,7 +236,7 @@ int alloc_vector_registers(struct task_struct *tsk)
|
||||
return -ENOMEM;
|
||||
preempt_disable();
|
||||
if (tsk == current)
|
||||
save_fpu_regs(&tsk->thread.fpu);
|
||||
save_fpu_regs();
|
||||
/* Copy the 16 floating point registers */
|
||||
convert_fp_to_vx(vxrs, tsk->thread.fpu.fprs);
|
||||
fprs = tsk->thread.fpu.fprs;
|
||||
@@ -257,7 +257,7 @@ void vector_exception(struct pt_regs *regs)
|
||||
}
|
||||
|
||||
/* get vector interrupt code from fpc */
|
||||
save_fpu_regs(¤t->thread.fpu);
|
||||
save_fpu_regs();
|
||||
vic = (current->thread.fpu.fpc & 0xf00) >> 8;
|
||||
switch (vic) {
|
||||
case 1: /* invalid vector operation */
|
||||
@@ -295,7 +295,7 @@ void data_exception(struct pt_regs *regs)
|
||||
|
||||
location = get_trap_ip(regs);
|
||||
|
||||
save_fpu_regs(¤t->thread.fpu);
|
||||
save_fpu_regs();
|
||||
/* Check for vector register enablement */
|
||||
if (MACHINE_HAS_VX && !is_vx_task(current) &&
|
||||
(current->thread.fpu.fpc & FPC_DXC_MASK) == 0xfe00) {
|
||||
|
Reference in New Issue
Block a user