···11-#ifndef _CRIS_ARCH_BYTEORDER_H22-#define _CRIS_ARCH_BYTEORDER_H11+#ifndef _CRIS_ARCH_SWAB_H22+#define _CRIS_ARCH_SWAB_H3344#include <asm/types.h>55#include <linux/compiler.h>66+77+#define __SWAB_64_THRU_32__6879/* we just define these two (as we can do the swap in a single810 * asm instruction in CRIS) and the arch-independent files will put911 * them together into ntohl etc.1012 */11131212-static inline __attribute_const__ __u32 ___arch__swab32(__u32 x)1414+static inline __attribute_const__ __u32 __arch_swab32(__u32 x)1315{1416 __asm__ ("swapwb %0" : "=r" (x) : "0" (x));1515-1717+1618 return(x);1719}2020+#define __arch_swab32 __arch_swab3218211919-static inline __attribute_const__ __u16 ___arch__swab16(__u16 x)2222+static inline __attribute_const__ __u16 __arch_swab16(__u16 x)2023{2124 __asm__ ("swapb %0" : "=r" (x) : "0" (x));2222-2525+2326 return(x);2427}2828+#define __arch_swab16 __arch_swab1625292630#endif
···11#ifndef _CRIS_BYTEORDER_H22#define _CRIS_BYTEORDER_H3344-#ifdef __GNUC__55-66-#ifdef __KERNEL__77-#include <arch/byteorder.h>88-99-/* defines are necessary because the other files detect the presence1010- * of a defined __arch_swab32, not an inline1111- */1212-#define __arch__swab32(x) ___arch__swab32(x)1313-#define __arch__swab16(x) ___arch__swab16(x)1414-#endif /* __KERNEL__ */1515-1616-#if !defined(__STRICT_ANSI__) || defined(__KERNEL__)1717-# define __BYTEORDER_HAS_U64__1818-# define __SWAB_64_THRU_32__1919-#endif2020-2121-#endif /* __GNUC__ */2222-44+#include <asm/swab.h>235#include <linux/byteorder/little_endian.h>246257#endif