aboutsummaryrefslogtreecommitdiffstats
path: root/arch/tile
diff options
context:
space:
mode:
authorSimon Marchi2012-12-17 19:08:10 -0600
committerChris Metcalf2012-12-18 13:53:14 -0600
commit9af62547675b04ef8aa5eda5f60450c01f598f2a (patch)
tree7e424dc34254d11aa7fe1e2eb9987f250584f25d /arch/tile
parent7be68284bd201174bc6663b010cb56867a874276 (diff)
downloadam43-linux-kernel-9af62547675b04ef8aa5eda5f60450c01f598f2a.tar.gz
am43-linux-kernel-9af62547675b04ef8aa5eda5f60450c01f598f2a.tar.xz
am43-linux-kernel-9af62547675b04ef8aa5eda5f60450c01f598f2a.zip
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>
Diffstat (limited to 'arch/tile')
-rw-r--r--arch/tile/kernel/ptrace.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/arch/tile/kernel/ptrace.c b/arch/tile/kernel/ptrace.c
index 882e3816477..9835312d5a9 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,
193 break; 193 break;
194 194
195 case PTRACE_GETREGS: /* Get all registers from the child. */ 195 case PTRACE_GETREGS: /* Get all registers from the child. */
196 if (copy_to_user(datap, getregs(child, &copyregs), 196 ret = copy_regset_to_user(child, &tile_user_regset_view,
197 sizeof(struct pt_regs)) == 0) { 197 REGSET_GPR, 0,
198 ret = 0; 198 sizeof(struct pt_regs), datap);
199 }
200 break; 199 break;
201 200
202 case PTRACE_SETREGS: /* Set all registers in the child. */ 201 case PTRACE_SETREGS: /* Set all registers in the child. */
203 if (copy_from_user(&copyregs, datap, 202 ret = copy_regset_from_user(child, &tile_user_regset_view,
204 sizeof(struct pt_regs)) == 0) { 203 REGSET_GPR, 0,
205 putregs(child, &copyregs); 204 sizeof(struct pt_regs), datap);
206 ret = 0;
207 }
208 break; 205 break;
209 206
210 case PTRACE_GETFPREGS: /* Get the child FPU state. */ 207 case PTRACE_GETFPREGS: /* Get the child FPU state. */