diff options
author | Harvey Harrison <harvey.harrison@gmail.com> | 2008-11-01 22:59:44 +0100 |
---|---|---|
committer | Jesper Nilsson <jesper.nilsson@axis.com> | 2008-11-03 08:38:10 +0100 |
commit | 0db42c6b23ce26b05b235dbe2e0aa096db194e33 (patch) | |
tree | c580ae9fc8a1e38b44f6b6bd8aa083dda971ac7d /arch/cris | |
parent | 45beca08dd8b6d6a65c5ffd730af2eac7a2c7a03 (diff) |
cris: use the new byteorder headers
Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Diffstat (limited to 'arch/cris')
-rw-r--r-- | arch/cris/include/arch-v10/arch/byteorder.h | 10 | ||||
-rw-r--r-- | arch/cris/include/arch-v32/arch/byteorder.h | 6 | ||||
-rw-r--r-- | arch/cris/include/asm/byteorder.h | 20 |
3 files changed, 14 insertions, 22 deletions
diff --git a/arch/cris/include/arch-v10/arch/byteorder.h b/arch/cris/include/arch-v10/arch/byteorder.h index 255b646b7fa8..ffbd6673a098 100644 --- a/arch/cris/include/arch-v10/arch/byteorder.h +++ b/arch/cris/include/arch-v10/arch/byteorder.h @@ -9,18 +9,20 @@ * them together into ntohl etc. */ -static inline __attribute_const__ __u32 ___arch__swab32(__u32 x) +static inline __attribute_const__ __u32 __arch_swab32(__u32 x) { __asm__ ("swapwb %0" : "=r" (x) : "0" (x)); - + return(x); } +#define __arch_swab32 __arch_swab32 -static inline __attribute_const__ __u16 ___arch__swab16(__u16 x) +static inline __attribute_const__ __u16 __arch_swab16(__u16 x) { __asm__ ("swapb %0" : "=r" (x) : "0" (x)); - + return(x); } +#define __arch_swab16 __arch_swab16 #endif diff --git a/arch/cris/include/arch-v32/arch/byteorder.h b/arch/cris/include/arch-v32/arch/byteorder.h index 6ef8fb4a35f2..fb76087fa2d9 100644 --- a/arch/cris/include/arch-v32/arch/byteorder.h +++ b/arch/cris/include/arch-v32/arch/byteorder.h @@ -4,17 +4,19 @@ #include <asm/types.h> static inline __const__ __u32 -___arch__swab32(__u32 x) +__arch_swab32(__u32 x) { __asm__ __volatile__ ("swapwb %0" : "=r" (x) : "0" (x)); return (x); } +#define __arch_swab32 __arch_swab32 static inline __const__ __u16 -___arch__swab16(__u16 x) +__arch_swab16(__u16 x) { __asm__ __volatile__ ("swapb %0" : "=r" (x) : "0" (x)); return (x); } +#define __arch_swab16 __arch_swab16 #endif /* _ASM_CRIS_ARCH_BYTEORDER_H */ diff --git a/arch/cris/include/asm/byteorder.h b/arch/cris/include/asm/byteorder.h index cc8e418cfd14..420c03021343 100644 --- a/arch/cris/include/asm/byteorder.h +++ b/arch/cris/include/asm/byteorder.h @@ -1,26 +1,14 @@ #ifndef _CRIS_BYTEORDER_H #define _CRIS_BYTEORDER_H -#ifdef __GNUC__ +#define __LITTLE_ENDIAN +#define __SWAB_64_THRU_32__ #ifdef __KERNEL__ -#include <arch/byteorder.h> - -/* defines are necessary because the other files detect the presence - * of a defined __arch_swab32, not an inline - */ -#define __arch__swab32(x) ___arch__swab32(x) -#define __arch__swab16(x) ___arch__swab16(x) -#endif /* __KERNEL__ */ - -#if !defined(__STRICT_ANSI__) || defined(__KERNEL__) -# define __BYTEORDER_HAS_U64__ -# define __SWAB_64_THRU_32__ +# include <arch/byteorder.h> #endif -#endif /* __GNUC__ */ - -#include <linux/byteorder/little_endian.h> +#include <linux/byteorder.h> #endif |