[PATCH] ppc64: fix semtimedop compat syscall

Stephen Rothwell sfr at canb.auug.org.au
Mon Apr 25 14:05:22 EST 2005

On Sun, 24 Apr 2005 20:50:32 -0700 "David S. Miller" <davem at davemloft.net> wrote:
> On Mon, 25 Apr 2005 13:29:22 +1000
> Stephen Rothwell <sfr at canb.auug.org.au> wrote:
> > > It all depends upon what the processor ABI says about incoming arguments,
> > > specifically whether the caller is expected to sign extend them or not.
> > > 
> > > If the caller is expected to sign extend, then "(long) (int) x" will get
> > > optimized away by the compiler.
> > 
> > Even if x is declared as unsigned int?
> No, not in that case.  I was mentioning the case where x is declared
> as a signed int.

ok, I lost some context, sorry.

So, if we declared all the parameters to the compat syscalls to be
"unsigned int" (or better compat_arg_t), then we would be able to do all
the type conversions in generic C code (assuming that the syscall
interface zero extends all the arguments) and then all the asm wrappers
would go away, right?

Stephen Rothwell                    sfr at canb.auug.org.au
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://ozlabs.org/pipermail/linuxppc64-dev/attachments/20050425/9be8401e/attachment.pgp 

More information about the Linuxppc64-dev mailing list