diff options
-rw-r--r-- | arch/powerpc/kernel/ptrace.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c index 9a0d24c390a3..8d5d4e921a5e 100644 --- a/arch/powerpc/kernel/ptrace.c +++ b/arch/powerpc/kernel/ptrace.c | |||
@@ -1554,8 +1554,8 @@ long arch_ptrace(struct task_struct *child, long request, | |||
1554 | 1554 | ||
1555 | flush_fp_to_thread(child); | 1555 | flush_fp_to_thread(child); |
1556 | if (fpidx < (PT_FPSCR - PT_FPR0)) | 1556 | if (fpidx < (PT_FPSCR - PT_FPR0)) |
1557 | tmp = ((unsigned long *)child->thread.fpr) | 1557 | memcpy(&tmp, &child->thread.TS_FPR(fpidx), |
1558 | [fpidx * TS_FPRWIDTH]; | 1558 | sizeof(long)); |
1559 | else | 1559 | else |
1560 | tmp = child->thread.fpscr.val; | 1560 | tmp = child->thread.fpscr.val; |
1561 | } | 1561 | } |
@@ -1587,8 +1587,8 @@ long arch_ptrace(struct task_struct *child, long request, | |||
1587 | 1587 | ||
1588 | flush_fp_to_thread(child); | 1588 | flush_fp_to_thread(child); |
1589 | if (fpidx < (PT_FPSCR - PT_FPR0)) | 1589 | if (fpidx < (PT_FPSCR - PT_FPR0)) |
1590 | ((unsigned long *)child->thread.fpr) | 1590 | memcpy(&child->thread.TS_FPR(fpidx), &data, |
1591 | [fpidx * TS_FPRWIDTH] = data; | 1591 | sizeof(long)); |
1592 | else | 1592 | else |
1593 | child->thread.fpscr.val = data; | 1593 | child->thread.fpscr.val = data; |
1594 | ret = 0; | 1594 | ret = 0; |