aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/kernel/ptrace.c')
-rw-r--r--arch/s390/kernel/ptrace.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/s390/kernel/ptrace.c b/arch/s390/kernel/ptrace.c
index 01c37b36caf9..02bd587b610b 100644
--- a/arch/s390/kernel/ptrace.c
+++ b/arch/s390/kernel/ptrace.c
@@ -963,6 +963,11 @@ static int s390_fpregs_set(struct task_struct *target,
963 if (target == current) 963 if (target == current)
964 save_fpu_regs(); 964 save_fpu_regs();
965 965
966 if (MACHINE_HAS_VX)
967 convert_vx_to_fp(fprs, target->thread.fpu.vxrs);
968 else
969 memcpy(&fprs, target->thread.fpu.fprs, sizeof(fprs));
970
966 /* If setting FPC, must validate it first. */ 971 /* If setting FPC, must validate it first. */
967 if (count > 0 && pos < offsetof(s390_fp_regs, fprs)) { 972 if (count > 0 && pos < offsetof(s390_fp_regs, fprs)) {
968 u32 ufpc[2] = { target->thread.fpu.fpc, 0 }; 973 u32 ufpc[2] = { target->thread.fpu.fpc, 0 };
@@ -1067,6 +1072,9 @@ static int s390_vxrs_low_set(struct task_struct *target,
1067 if (target == current) 1072 if (target == current)
1068 save_fpu_regs(); 1073 save_fpu_regs();
1069 1074
1075 for (i = 0; i < __NUM_VXRS_LOW; i++)
1076 vxrs[i] = *((__u64 *)(target->thread.fpu.vxrs + i) + 1);
1077
1070 rc = user_regset_copyin(&pos, &count, &kbuf, &ubuf, vxrs, 0, -1); 1078 rc = user_regset_copyin(&pos, &count, &kbuf, &ubuf, vxrs, 0, -1);
1071 if (rc == 0) 1079 if (rc == 0)
1072 for (i = 0; i < __NUM_VXRS_LOW; i++) 1080 for (i = 0; i < __NUM_VXRS_LOW; i++)