Messages in this thread | | | Subject | Re: [PATCH 14/20] parisc: use the new byteorder headers | From | Harvey Harrison <> | Date | Fri, 01 Aug 2008 14:23:37 -0700 |
| |
On Fri, 2008-08-01 at 10:06 -0600, Grant Grundler wrote: > On Thu, Jul 17, 2008 at 05:09:43PM -0700, Harvey Harrison wrote: > > Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> > > --- > > include/asm-parisc/byteorder.h | 37 ++++++++++++------------------------- > > 1 files changed, 12 insertions(+), 25 deletions(-) > > > > diff --git a/include/asm-parisc/byteorder.h b/include/asm-parisc/byteorder.h > > index db14831..5e56b1b 100644 > > --- a/include/asm-parisc/byteorder.h > > +++ b/include/asm-parisc/byteorder.h > > @@ -4,9 +4,10 @@ > > #include <asm/types.h> > > #include <linux/compiler.h> > > > > -#ifdef __GNUC__ > > +#define __LITTLE_ENDIAN > > Sorry, this looks wrong. parisc is big endian.
Sorry, it is wrong. It of course should be __BIG_ENDIAN
> > +#define __SWAB_64_THRU_32__ > > Should this only be defined if BITS_PER_LONG is <=32 ? >
The new byteorder headers only uses this if no __arch_swab64 is defined.
Further down in the parisc version, an __arch_swab64 is defined in the BITS_PER_LONG >=32 case, making this moot.
>From the new linux/swab.h:
static inline __attribute_const__ __u64 ___swab64(__u64 val) { #ifdef __arch_swab64 return __arch_swab64(val); #elif defined(__arch_swab64p) return __arch_swab64p(&val); #elif defined(__SWAB_64_THRU_32__) __u32 h = val >> 32; __u32 l = val & ((1ULL << 32) - 1); return (((__u64)___swab32(l)) << 32) | ((__u64)(___swab32(h))); #else return __const_swab64(val); #endif }
Other than the endianness, any other concerns?
Harvey
| |