diff options
Diffstat (limited to 'arch/sh/kernel/ptrace_32.c')
-rw-r--r-- | arch/sh/kernel/ptrace_32.c | 21 |
1 files changed, 11 insertions, 10 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 | ||
368 | long arch_ptrace(struct task_struct *child, long request, long addr, long data) | 368 | long 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 | } |