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 <[email protected]>
Cc: <[email protected]>
Acked-by: Roland McGrath <[email protected]>
Acked-by: David Howells <[email protected]>
Acked-by: Geert Uytterhoeven <[email protected]>
Acked-by: David S. Miller <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
Namhyung Kim 2010-10-27 15:33:47 -07:00 • committed by Linus Torvalds
commit 9b05a69e05
30 changed files with 101 additions and 70 deletions

View file

@ -365,7 +365,8 @@ const struct user_regset_view *task_user_regset_view(struct task_struct *task)
return &user_sh_native_view;
}
long arch_ptrace(struct task_struct *child, long request, long addr, long data)
long arch_ptrace(struct task_struct *child, long request,
unsigned long addr, unsigned long data)
{
struct user * dummy = NULL;
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)
if (addr < sizeof(struct pt_regs))
tmp = get_stack_long(child, addr);
else if (addr >= (long) &dummy->fpu &&
addr < (long) &dummy->u_fpvalid) {
else if (addr >= (unsigned long) &dummy->fpu &&
addr < (unsigned long) &dummy->u_fpvalid) {
if (!tsk_used_math(child)) {
if (addr == (long)&dummy->fpu.fpscr)
if (addr == (unsigned long)&dummy->fpu.fpscr)
tmp = FPSCR_INIT;
else
tmp = 0;
} else
tmp = ((long *)child->thread.xstate)
tmp = ((unsigned long *)child->thread.xstate)
[(addr - (long)&dummy->fpu) >> 2];
} else if (addr == (long) &dummy->u_fpvalid)
} else if (addr == (unsigned long) &dummy->u_fpvalid)
tmp = !!tsk_used_math(child);
else if (addr == PT_TEXT_ADDR)
tmp = child->mm->start_code;
@ -417,13 +418,13 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
if (addr < sizeof(struct pt_regs))
ret = put_stack_long(child, addr, data);
else if (addr >= (long) &dummy->fpu &&
addr < (long) &dummy->u_fpvalid) {
else if (addr >= (unsigned long) &dummy->fpu &&
addr < (unsigned long) &dummy->u_fpvalid) {
set_stopped_child_used_math(child);
((long *)child->thread.xstate)
((unsigned long *)child->thread.xstate)
[(addr - (long)&dummy->fpu) >> 2] = data;
ret = 0;
} else if (addr == (long) &dummy->u_fpvalid) {
} else if (addr == (unsigned long) &dummy->u_fpvalid) {
conditional_stopped_child_used_math(data, child);
ret = 0;
}

View file

@ -383,7 +383,8 @@ const struct user_regset_view *task_user_regset_view(struct task_struct *task)
return &user_sh64_native_view;
}
long arch_ptrace(struct task_struct *child, long request, long addr, long data)
long arch_ptrace(struct task_struct *child, long request,
unsigned long addr, unsigned long data)
{
int ret;
@ -471,7 +472,8 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
return ret;
}
asmlinkage int sh64_ptrace(long request, long pid, long addr, long data)
asmlinkage int sh64_ptrace(long request, long pid,
unsigned long addr, unsigned long data)
{
#define WPC_DBRMODE 0x0d104008
static unsigned long first_call;