Skip to content

Commit

Permalink
arch/tile: implement arch_ptrace using user_regset on tile
Browse files Browse the repository at this point in the history
This patch changes arch_ptrace on tile so that it uses user_regset
to implement the PTRACE_GETREGS and PTRACE_SETREGS operations.

Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
  • Loading branch information
Simon Marchi authored and Chris Metcalf committed Dec 18, 2012
1 parent 7be6828 commit 9af6254
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions arch/tile/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,18 +193,15 @@ long arch_ptrace(struct task_struct *child, long request,
break;

case PTRACE_GETREGS: /* Get all registers from the child. */
if (copy_to_user(datap, getregs(child, &copyregs),
sizeof(struct pt_regs)) == 0) {
ret = 0;
}
ret = copy_regset_to_user(child, &tile_user_regset_view,
REGSET_GPR, 0,
sizeof(struct pt_regs), datap);
break;

case PTRACE_SETREGS: /* Set all registers in the child. */
if (copy_from_user(&copyregs, datap,
sizeof(struct pt_regs)) == 0) {
putregs(child, &copyregs);
ret = 0;
}
ret = copy_regset_from_user(child, &tile_user_regset_view,
REGSET_GPR, 0,
sizeof(struct pt_regs), datap);
break;

case PTRACE_GETFPREGS: /* Get the child FPU state. */
Expand Down

0 comments on commit 9af6254

Please sign in to comment.