diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2012-12-17 20:08:10 -0500 |
---|---|---|
committer | Chris Metcalf <cmetcalf@tilera.com> | 2012-12-18 14:53:14 -0500 |
commit | 9af62547675b04ef8aa5eda5f60450c01f598f2a (patch) | |
tree | 7e424dc34254d11aa7fe1e2eb9987f250584f25d | |
parent | 7be68284bd201174bc6663b010cb56867a874276 (diff) | |
download | linux-9af62547675b04ef8aa5eda5f60450c01f598f2a.tar.bz2 |
arch/tile: implement arch_ptrace using user_regset on tile
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>
-rw-r--r-- | arch/tile/kernel/ptrace.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/arch/tile/kernel/ptrace.c b/arch/tile/kernel/ptrace.c index 882e38164773..9835312d5a91 100644 --- a/arch/tile/kernel/ptrace.c +++ b/arch/tile/kernel/ptrace.c @@ -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, ©regs), - 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(©regs, datap, - sizeof(struct pt_regs)) == 0) { - putregs(child, ©regs); - 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. */ |