aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/ptrace32.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2007-06-04 01:15:44 -0400
committerPaul Mackerras <paulus@samba.org>2007-06-14 08:29:57 -0400
commit865418d8e78b9c11c964157740b2596d6ffe9dfa (patch)
tree2ef4b1652fe38c7b9e172ca7a8aef906602d3692 /arch/powerpc/kernel/ptrace32.c
parente17666ba48f78ff10162d7448e7c92d668d8faf6 (diff)
[POWERPC] Uninline common ptrace bits
This folds back the ptrace-common.h bits back into ptrace.c and removes that file. The FSL SPE bits from ptrace-ppc32.h are folded back in as well. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/ptrace32.c')
-rw-r--r--arch/powerpc/kernel/ptrace32.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/arch/powerpc/kernel/ptrace32.c b/arch/powerpc/kernel/ptrace32.c
index 98b1580a2bc2..4511b422992f 100644
--- a/arch/powerpc/kernel/ptrace32.c
+++ b/arch/powerpc/kernel/ptrace32.c
@@ -34,7 +34,6 @@
34#include <asm/system.h> 34#include <asm/system.h>
35 35
36#include "ptrace-ppc64.h" 36#include "ptrace-ppc64.h"
37#include "ptrace-common.h"
38 37
39/* 38/*
40 * does not yet catch signals sent when the child dies. 39 * does not yet catch signals sent when the child dies.
@@ -168,7 +167,7 @@ long compat_sys_ptrace(int request, int pid, unsigned long addr,
168 break; 167 break;
169 168
170 if (index < PT_FPR0) { 169 if (index < PT_FPR0) {
171 tmp = get_reg(child, index); 170 tmp = ptrace_get_reg(child, index);
172 } else { 171 } else {
173 flush_fp_to_thread(child); 172 flush_fp_to_thread(child);
174 /* 173 /*
@@ -215,7 +214,7 @@ long compat_sys_ptrace(int request, int pid, unsigned long addr,
215 flush_fp_to_thread(child); 214 flush_fp_to_thread(child);
216 tmp = ((unsigned long int *)child->thread.fpr)[numReg - PT_FPR0]; 215 tmp = ((unsigned long int *)child->thread.fpr)[numReg - PT_FPR0];
217 } else { /* register within PT_REGS struct */ 216 } else { /* register within PT_REGS struct */
218 tmp = get_reg(child, numReg); 217 tmp = ptrace_get_reg(child, numReg);
219 } 218 }
220 reg32bits = ((u32*)&tmp)[part]; 219 reg32bits = ((u32*)&tmp)[part];
221 ret = put_user(reg32bits, (u32 __user *)data); 220 ret = put_user(reg32bits, (u32 __user *)data);
@@ -274,7 +273,7 @@ long compat_sys_ptrace(int request, int pid, unsigned long addr,
274 if (index == PT_ORIG_R3) 273 if (index == PT_ORIG_R3)
275 break; 274 break;
276 if (index < PT_FPR0) { 275 if (index < PT_FPR0) {
277 ret = put_reg(child, index, data); 276 ret = ptrace_put_reg(child, index, data);
278 } else { 277 } else {
279 flush_fp_to_thread(child); 278 flush_fp_to_thread(child);
280 /* 279 /*
@@ -346,7 +345,7 @@ long compat_sys_ptrace(int request, int pid, unsigned long addr,
346 } 345 }
347 ret = 0; 346 ret = 0;
348 for (ui = 0; ui < PT_REGS_COUNT; ui ++) { 347 for (ui = 0; ui < PT_REGS_COUNT; ui ++) {
349 ret |= __put_user(get_reg(child, ui), 348 ret |= __put_user(ptrace_get_reg(child, ui),
350 (unsigned int __user *) data); 349 (unsigned int __user *) data);
351 data += sizeof(int); 350 data += sizeof(int);
352 } 351 }
@@ -366,7 +365,7 @@ long compat_sys_ptrace(int request, int pid, unsigned long addr,
366 ret = __get_user(tmp, (unsigned int __user *) data); 365 ret = __get_user(tmp, (unsigned int __user *) data);
367 if (ret) 366 if (ret)
368 break; 367 break;
369 put_reg(child, ui, tmp); 368 ptrace_put_reg(child, ui, tmp);
370 data += sizeof(int); 369 data += sizeof(int);
371 } 370 }
372 break; 371 break;