diff options
author | Hendrik Brueckner <brueckner@linux.vnet.ibm.com> | 2015-06-29 16:43:06 +0200 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2015-08-03 10:04:37 +0200 |
commit | d0164ee20d98847d3c777a0ae90e678e7ac1e416 (patch) | |
tree | 524bb68d1e46da8876da38e683b5474a7ec7f7ac /arch/s390/kernel/ptrace.c | |
parent | 2a01bd1bd3d28d1eef26d5509c95d0923f7dc75c (diff) | |
download | linux-d0164ee20d98847d3c777a0ae90e678e7ac1e416.tar.bz2 |
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>
Diffstat (limited to 'arch/s390/kernel/ptrace.c')
-rw-r--r-- | arch/s390/kernel/ptrace.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/s390/kernel/ptrace.c b/arch/s390/kernel/ptrace.c index 8c525880a3ff..8b1c8e33f184 100644 --- a/arch/s390/kernel/ptrace.c +++ b/arch/s390/kernel/ptrace.c @@ -943,7 +943,7 @@ static int s390_fpregs_get(struct task_struct *target, _s390_fp_regs fp_regs; if (target == current) - save_fpu_regs(&target->thread.fpu); + save_fpu_regs(); fp_regs.fpc = target->thread.fpu.fpc; fpregs_store(&fp_regs, &target->thread.fpu); @@ -961,7 +961,7 @@ static int s390_fpregs_set(struct task_struct *target, freg_t fprs[__NUM_FPRS]; if (target == current) - save_fpu_regs(&target->thread.fpu); + save_fpu_regs(); /* If setting FPC, must validate it first. */ if (count > 0 && pos < offsetof(s390_fp_regs, fprs)) { @@ -1049,7 +1049,7 @@ static int s390_vxrs_low_get(struct task_struct *target, return -ENODEV; if (is_vx_task(target)) { if (target == current) - save_fpu_regs(&target->thread.fpu); + save_fpu_regs(); for (i = 0; i < __NUM_VXRS_LOW; i++) vxrs[i] = *((__u64 *)(target->thread.fpu.vxrs + i) + 1); } else @@ -1072,7 +1072,7 @@ static int s390_vxrs_low_set(struct task_struct *target, if (rc) return rc; } else if (target == current) - save_fpu_regs(&target->thread.fpu); + save_fpu_regs(); rc = user_regset_copyin(&pos, &count, &kbuf, &ubuf, vxrs, 0, -1); if (rc == 0) @@ -1093,7 +1093,7 @@ static int s390_vxrs_high_get(struct task_struct *target, return -ENODEV; if (is_vx_task(target)) { if (target == current) - save_fpu_regs(&target->thread.fpu); + save_fpu_regs(); memcpy(vxrs, target->thread.fpu.vxrs + __NUM_VXRS_LOW, sizeof(vxrs)); } else @@ -1115,7 +1115,7 @@ static int s390_vxrs_high_set(struct task_struct *target, if (rc) return rc; } else if (target == current) - save_fpu_regs(&target->thread.fpu); + save_fpu_regs(); rc = user_regset_copyin(&pos, &count, &kbuf, &ubuf, target->thread.fpu.vxrs + __NUM_VXRS_LOW, 0, -1); |