lkml.org 
[lkml]   [2011]   [Oct]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH RFC 2/8] blackfin: implement syscall restart generically
On Sun, Oct 23, 2011 at 06:19, Jonas Bonn <jonas@southpole.se> wrote:
> --- a/arch/blackfin/include/asm/syscall.h
> +++ b/arch/blackfin/include/asm/syscall.h
>
>  static inline long
>  syscall_get_nr(struct task_struct *task, struct pt_regs *regs)
>  {
> -       return regs->p0;
> +       return regs->orig_p0;
>  }

i'm not sure this is correct. we set the orig_p0 to -1 when forcing
the syscall to go to restart. shouldn't syscall_get_nr() still return
the right value ?

>  syscall_set_return_value(struct task_struct *task, struct pt_regs *regs,
>                          int error, long val)
>  {
> -       regs->r0 = error ? -error : val;
> +       regs->r0 = error ? error : val;
>  }

this fix is unrelated (and unmentioned in the changelog). i also see
a bunch of other arches doing this. so we should pull this change out
into a dedicated patchset, and fix all the arches at the same time.
-mike
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2011-10-26 02:05    [from the cache]
©2003-2011 Jasper Spaans