aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@gmail.com>2010-10-27 18:33:47 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-27 21:03:10 -0400
commit9b05a69e0534ec70bc94921936ffa05b330507cb (patch)
tree4116a7b7db286edf9486a29a7742d47fa67baa68 /arch/sh
parent9fed81dc40f5a1ac2783bcc78d4029873be72894 (diff)
ptrace: change signature of arch_ptrace()
Fix up the arguments to arch_ptrace() to take account of the fact that @addr and @data are now unsigned long rather than long as of a preceding patch in this series. Signed-off-by: Namhyung Kim <namhyung@gmail.com> Cc: <linux-arch@vger.kernel.org> Acked-by: Roland McGrath <roland@redhat.com> Acked-by: David Howells <dhowells@redhat.com> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/sh')
-rw-r--r--arch/sh/kernel/ptrace_32.c21
-rw-r--r--arch/sh/kernel/ptrace_64.c6
2 files changed, 15 insertions, 12 deletions
diff --git a/arch/sh/kernel/ptrace_32.c b/arch/sh/kernel/ptrace_32.c
index 2cd42b58cb20..34bf03745e86 100644
--- a/arch/sh/kernel/ptrace_32.c
+++ b/arch/sh/kernel/ptrace_32.c
@@ -365,7 +365,8 @@ const struct user_regset_view *task_user_regset_view(struct task_struct *task)
365 return &user_sh_native_view; 365 return &user_sh_native_view;
366} 366}
367 367
368long arch_ptrace(struct task_struct *child, long request, long addr, long data) 368long arch_ptrace(struct task_struct *child, long request,
369 unsigned long addr, unsigned long data)
369{ 370{
370 struct user * dummy = NULL; 371 struct user * dummy = NULL;
371 unsigned long __user *datap = (unsigned long __user *)data; 372 unsigned long __user *datap = (unsigned long __user *)data;
@@ -383,17 +384,17 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
383 384
384 if (addr < sizeof(struct pt_regs)) 385 if (addr < sizeof(struct pt_regs))
385 tmp = get_stack_long(child, addr); 386 tmp = get_stack_long(child, addr);
386 else if (addr >= (long) &dummy->fpu && 387 else if (addr >= (unsigned long) &dummy->fpu &&
387 addr < (long) &dummy->u_fpvalid) { 388 addr < (unsigned long) &dummy->u_fpvalid) {
388 if (!tsk_used_math(child)) { 389 if (!tsk_used_math(child)) {
389 if (addr == (long)&dummy->fpu.fpscr) 390 if (addr == (unsigned long)&dummy->fpu.fpscr)
390 tmp = FPSCR_INIT; 391 tmp = FPSCR_INIT;
391 else 392 else
392 tmp = 0; 393 tmp = 0;
393 } else 394 } else
394 tmp = ((long *)child->thread.xstate) 395 tmp = ((unsigned long *)child->thread.xstate)
395 [(addr - (long)&dummy->fpu) >> 2]; 396 [(addr - (long)&dummy->fpu) >> 2];
396 } else if (addr == (long) &dummy->u_fpvalid) 397 } else if (addr == (unsigned long) &dummy->u_fpvalid)
397 tmp = !!tsk_used_math(child); 398 tmp = !!tsk_used_math(child);
398 else if (addr == PT_TEXT_ADDR) 399 else if (addr == PT_TEXT_ADDR)
399 tmp = child->mm->start_code; 400 tmp = child->mm->start_code;
@@ -417,13 +418,13 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
417 418
418 if (addr < sizeof(struct pt_regs)) 419 if (addr < sizeof(struct pt_regs))
419 ret = put_stack_long(child, addr, data); 420 ret = put_stack_long(child, addr, data);
420 else if (addr >= (long) &dummy->fpu && 421 else if (addr >= (unsigned long) &dummy->fpu &&
421 addr < (long) &dummy->u_fpvalid) { 422 addr < (unsigned long) &dummy->u_fpvalid) {
422 set_stopped_child_used_math(child); 423 set_stopped_child_used_math(child);
423 ((long *)child->thread.xstate) 424 ((unsigned long *)child->thread.xstate)
424 [(addr - (long)&dummy->fpu) >> 2] = data; 425 [(addr - (long)&dummy->fpu) >> 2] = data;
425 ret = 0; 426 ret = 0;
426 } else if (addr == (long) &dummy->u_fpvalid) { 427 } else if (addr == (unsigned long) &dummy->u_fpvalid) {
427 conditional_stopped_child_used_math(data, child); 428 conditional_stopped_child_used_math(data, child);
428 ret = 0; 429 ret = 0;
429 } 430 }
diff --git a/arch/sh/kernel/ptrace_64.c b/arch/sh/kernel/ptrace_64.c
index e0fb065914aa..4840716c196a 100644
--- a/arch/sh/kernel/ptrace_64.c
+++ b/arch/sh/kernel/ptrace_64.c
@@ -383,7 +383,8 @@ const struct user_regset_view *task_user_regset_view(struct task_struct *task)
383 return &user_sh64_native_view; 383 return &user_sh64_native_view;
384} 384}
385 385
386long arch_ptrace(struct task_struct *child, long request, long addr, long data) 386long arch_ptrace(struct task_struct *child, long request,
387 unsigned long addr, unsigned long data)
387{ 388{
388 int ret; 389 int ret;
389 390
@@ -471,7 +472,8 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
471 return ret; 472 return ret;
472} 473}
473 474
474asmlinkage int sh64_ptrace(long request, long pid, long addr, long data) 475asmlinkage int sh64_ptrace(long request, long pid,
476 unsigned long addr, unsigned long data)
475{ 477{
476#define WPC_DBRMODE 0x0d104008 478#define WPC_DBRMODE 0x0d104008
477 static unsigned long first_call; 479 static unsigned long first_call;