Re: [COMPAT] Add compat_merge64 helper

2007-10-03 Thread Ralf Baechle
On Sat, Sep 29, 2007 at 11:48:52AM +0200, Heiko Carstens wrote: > > +static inline u64 compat_merge64(u32 left, u32 right) > > +{ > > +#if defined(__BIG_ENDIAN) > > + return ((u64)left << 32) | right; > > +#else /* defined (__LITTLE_ENDIAN) */ > > Could you change that to an #elif please and #e

Re: [COMPAT] Add compat_merge64 helper

2007-09-29 Thread Heiko Carstens
On Fri, Sep 28, 2007 at 06:33:51PM -0400, Kyle McMartin wrote: > To be used when endianness matters for argument ordering when reassembling > a 64-bit value out of two register halves. > > Signed-off-by: Kyle McMartin <[EMAIL PROTECTED]> > > +static inline u64 compat_merge64(u32 left, u32 right) >

Re: [COMPAT] Add compat_merge64 helper

2007-09-29 Thread Paul Mundt
On Fri, Sep 28, 2007 at 08:02:47PM -0400, Kyle McMartin wrote: > On Fri, Sep 28, 2007 at 08:01:31PM -0400, Kyle McMartin wrote: > > I checked powerpc, sparc, and mips, which are (besides parisc) the only > > 64-bit with 32-bit userspace big endian architectures that I could think > > of offhand. A

Re: [COMPAT] Add compat_merge64 helper

2007-09-28 Thread Arnd Bergmann
On Saturday 29 September 2007, Kyle McMartin wrote: > > On Sat, Sep 29, 2007 at 01:38:23AM +0200, Arnd Bergmann wrote: > > 1. Byte order matches the order in which 64 bit arguments are split > >    in system call conventions on all platforms. > > I checked powerpc, sparc, and mips, which are (bes

Re: [COMPAT] Add compat_merge64 helper

2007-09-28 Thread Kyle McMartin
On Fri, Sep 28, 2007 at 08:01:31PM -0400, Kyle McMartin wrote: > I checked powerpc, sparc, and mips, which are (besides parisc) the only > 64-bit with 32-bit userspace big endian architectures that I could think > of offhand. A quick grep shows sh64 too... Paul? > Ah, no CONFIG_COMPAT on sh64 any

Re: [COMPAT] Add compat_merge64 helper

2007-09-28 Thread Kyle McMartin
On Sat, Sep 29, 2007 at 01:38:23AM +0200, Arnd Bergmann wrote: > 1. Byte order matches the order in which 64 bit arguments are split >in system call conventions on all platforms. I checked powerpc, sparc, and mips, which are (besides parisc) the only 64-bit with 32-bit userspace big endian arc

Re: [COMPAT] Add compat_merge64 helper

2007-09-28 Thread Arnd Bergmann
On Saturday 29 September 2007, you wrote: > +static inline u64 compat_merge64(u32 left, u32 right) > +{ > +#if defined(__BIG_ENDIAN) > +   return ((u64)left << 32) | right; > +#else /* defined (__LITTLE_ENDIAN) */ > +   return ((u64)right << 32) | left; > +#endif > +} Looks good, if we can

[COMPAT] Add compat_merge64 helper

2007-09-28 Thread Kyle McMartin
To be used when endianness matters for argument ordering when reassembling a 64-bit value out of two register halves. Signed-off-by: Kyle McMartin <[EMAIL PROTECTED]> --- include/linux/compat.h |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/include/linux/compat.h