aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/ptrace.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/ptrace.c')
-rw-r--r--arch/powerpc/kernel/ptrace.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c
index 6b66cd85b433..3635be61f899 100644
--- a/arch/powerpc/kernel/ptrace.c
+++ b/arch/powerpc/kernel/ptrace.c
@@ -375,7 +375,7 @@ static int vsr_get(struct task_struct *target, const struct user_regset *regset,
375 flush_vsx_to_thread(target); 375 flush_vsx_to_thread(target);
376 376
377 for (i = 0; i < 32 ; i++) 377 for (i = 0; i < 32 ; i++)
378 buf[i] = current->thread.fpr[i][TS_VSRLOWOFFSET]; 378 buf[i] = target->thread.fpr[i][TS_VSRLOWOFFSET];
379 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, 379 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf,
380 buf, 0, 32 * sizeof(double)); 380 buf, 0, 32 * sizeof(double));
381 381
@@ -394,7 +394,7 @@ static int vsr_set(struct task_struct *target, const struct user_regset *regset,
394 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, 394 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf,
395 buf, 0, 32 * sizeof(double)); 395 buf, 0, 32 * sizeof(double));
396 for (i = 0; i < 32 ; i++) 396 for (i = 0; i < 32 ; i++)
397 current->thread.fpr[i][TS_VSRLOWOFFSET] = buf[i]; 397 target->thread.fpr[i][TS_VSRLOWOFFSET] = buf[i];
398 398
399 399
400 return ret; 400 return ret;
@@ -975,15 +975,13 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
975 case PTRACE_GETVSRREGS: 975 case PTRACE_GETVSRREGS:
976 return copy_regset_to_user(child, &user_ppc_native_view, 976 return copy_regset_to_user(child, &user_ppc_native_view,
977 REGSET_VSX, 977 REGSET_VSX,
978 0, (32 * sizeof(vector128) + 978 0, 32 * sizeof(double),
979 sizeof(u32)),
980 (void __user *) data); 979 (void __user *) data);
981 980
982 case PTRACE_SETVSRREGS: 981 case PTRACE_SETVSRREGS:
983 return copy_regset_from_user(child, &user_ppc_native_view, 982 return copy_regset_from_user(child, &user_ppc_native_view,
984 REGSET_VSX, 983 REGSET_VSX,
985 0, (32 * sizeof(vector128) + 984 0, 32 * sizeof(double),
986 sizeof(u32)),
987 (const void __user *) data); 985 (const void __user *) data);
988#endif 986#endif
989#ifdef CONFIG_SPE 987#ifdef CONFIG_SPE