aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/ptrace.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc64/kernel/ptrace.c')
-rw-r--r--arch/sparc64/kernel/ptrace.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/arch/sparc64/kernel/ptrace.c b/arch/sparc64/kernel/ptrace.c
index 84d3df2264cb..3e4077c84a23 100644
--- a/arch/sparc64/kernel/ptrace.c
+++ b/arch/sparc64/kernel/ptrace.c
@@ -324,7 +324,7 @@ asmlinkage void do_ptrace(struct pt_regs *regs)
324 unsigned long tpc = cregs->tpc; 324 unsigned long tpc = cregs->tpc;
325 int rval; 325 int rval;
326 326
327 if ((child->thread_info->flags & _TIF_32BIT) != 0) 327 if ((task_thread_info(child)->flags & _TIF_32BIT) != 0)
328 tpc &= 0xffffffff; 328 tpc &= 0xffffffff;
329 if (__put_user(cregs->tstate, (&pregs->tstate)) || 329 if (__put_user(cregs->tstate, (&pregs->tstate)) ||
330 __put_user(tpc, (&pregs->tpc)) || 330 __put_user(tpc, (&pregs->tpc)) ||
@@ -395,7 +395,7 @@ asmlinkage void do_ptrace(struct pt_regs *regs)
395 pt_error_return(regs, EFAULT); 395 pt_error_return(regs, EFAULT);
396 goto out_tsk; 396 goto out_tsk;
397 } 397 }
398 if ((child->thread_info->flags & _TIF_32BIT) != 0) { 398 if ((task_thread_info(child)->flags & _TIF_32BIT) != 0) {
399 tpc &= 0xffffffff; 399 tpc &= 0xffffffff;
400 tnpc &= 0xffffffff; 400 tnpc &= 0xffffffff;
401 } 401 }
@@ -430,11 +430,11 @@ asmlinkage void do_ptrace(struct pt_regs *regs)
430 } fpq[16]; 430 } fpq[16];
431 }; 431 };
432 struct fps __user *fps = (struct fps __user *) addr; 432 struct fps __user *fps = (struct fps __user *) addr;
433 unsigned long *fpregs = child->thread_info->fpregs; 433 unsigned long *fpregs = task_thread_info(child)->fpregs;
434 434
435 if (copy_to_user(&fps->regs[0], fpregs, 435 if (copy_to_user(&fps->regs[0], fpregs,
436 (32 * sizeof(unsigned int))) || 436 (32 * sizeof(unsigned int))) ||
437 __put_user(child->thread_info->xfsr[0], (&fps->fsr)) || 437 __put_user(task_thread_info(child)->xfsr[0], (&fps->fsr)) ||
438 __put_user(0, (&fps->fpqd)) || 438 __put_user(0, (&fps->fpqd)) ||
439 __put_user(0, (&fps->flags)) || 439 __put_user(0, (&fps->flags)) ||
440 __put_user(0, (&fps->extra)) || 440 __put_user(0, (&fps->extra)) ||
@@ -452,11 +452,11 @@ asmlinkage void do_ptrace(struct pt_regs *regs)
452 unsigned long fsr; 452 unsigned long fsr;
453 }; 453 };
454 struct fps __user *fps = (struct fps __user *) addr; 454 struct fps __user *fps = (struct fps __user *) addr;
455 unsigned long *fpregs = child->thread_info->fpregs; 455 unsigned long *fpregs = task_thread_info(child)->fpregs;
456 456
457 if (copy_to_user(&fps->regs[0], fpregs, 457 if (copy_to_user(&fps->regs[0], fpregs,
458 (64 * sizeof(unsigned int))) || 458 (64 * sizeof(unsigned int))) ||
459 __put_user(child->thread_info->xfsr[0], (&fps->fsr))) { 459 __put_user(task_thread_info(child)->xfsr[0], (&fps->fsr))) {
460 pt_error_return(regs, EFAULT); 460 pt_error_return(regs, EFAULT);
461 goto out_tsk; 461 goto out_tsk;
462 } 462 }
@@ -477,7 +477,7 @@ asmlinkage void do_ptrace(struct pt_regs *regs)
477 } fpq[16]; 477 } fpq[16];
478 }; 478 };
479 struct fps __user *fps = (struct fps __user *) addr; 479 struct fps __user *fps = (struct fps __user *) addr;
480 unsigned long *fpregs = child->thread_info->fpregs; 480 unsigned long *fpregs = task_thread_info(child)->fpregs;
481 unsigned fsr; 481 unsigned fsr;
482 482
483 if (copy_from_user(fpregs, &fps->regs[0], 483 if (copy_from_user(fpregs, &fps->regs[0],
@@ -486,11 +486,11 @@ asmlinkage void do_ptrace(struct pt_regs *regs)
486 pt_error_return(regs, EFAULT); 486 pt_error_return(regs, EFAULT);
487 goto out_tsk; 487 goto out_tsk;
488 } 488 }
489 child->thread_info->xfsr[0] &= 0xffffffff00000000UL; 489 task_thread_info(child)->xfsr[0] &= 0xffffffff00000000UL;
490 child->thread_info->xfsr[0] |= fsr; 490 task_thread_info(child)->xfsr[0] |= fsr;
491 if (!(child->thread_info->fpsaved[0] & FPRS_FEF)) 491 if (!(task_thread_info(child)->fpsaved[0] & FPRS_FEF))
492 child->thread_info->gsr[0] = 0; 492 task_thread_info(child)->gsr[0] = 0;
493 child->thread_info->fpsaved[0] |= (FPRS_FEF | FPRS_DL); 493 task_thread_info(child)->fpsaved[0] |= (FPRS_FEF | FPRS_DL);
494 pt_succ_return(regs, 0); 494 pt_succ_return(regs, 0);
495 goto out_tsk; 495 goto out_tsk;
496 } 496 }
@@ -501,17 +501,17 @@ asmlinkage void do_ptrace(struct pt_regs *regs)
501 unsigned long fsr; 501 unsigned long fsr;
502 }; 502 };
503 struct fps __user *fps = (struct fps __user *) addr; 503 struct fps __user *fps = (struct fps __user *) addr;
504 unsigned long *fpregs = child->thread_info->fpregs; 504 unsigned long *fpregs = task_thread_info(child)->fpregs;
505 505
506 if (copy_from_user(fpregs, &fps->regs[0], 506 if (copy_from_user(fpregs, &fps->regs[0],
507 (64 * sizeof(unsigned int))) || 507 (64 * sizeof(unsigned int))) ||
508 __get_user(child->thread_info->xfsr[0], (&fps->fsr))) { 508 __get_user(task_thread_info(child)->xfsr[0], (&fps->fsr))) {
509 pt_error_return(regs, EFAULT); 509 pt_error_return(regs, EFAULT);
510 goto out_tsk; 510 goto out_tsk;
511 } 511 }
512 if (!(child->thread_info->fpsaved[0] & FPRS_FEF)) 512 if (!(task_thread_info(child)->fpsaved[0] & FPRS_FEF))
513 child->thread_info->gsr[0] = 0; 513 task_thread_info(child)->gsr[0] = 0;
514 child->thread_info->fpsaved[0] |= (FPRS_FEF | FPRS_DL | FPRS_DU); 514 task_thread_info(child)->fpsaved[0] |= (FPRS_FEF | FPRS_DL | FPRS_DU);
515 pt_succ_return(regs, 0); 515 pt_succ_return(regs, 0);
516 goto out_tsk; 516 goto out_tsk;
517 } 517 }