# define __SWAB_64_THRU_32__
#endif
- #if defined(__KERNEL__) && __LINUX_ARM_ARCH__ >= 6
+ #if defined(__KERNEL__)
+ #if __LINUX_ARM_ARCH__ >= 6
-static inline __attribute_const__ __u16 __arch_swab16(__u16 x)
+static inline __attribute_const__ __u32 __arch_swahb32(__u32 x)
{
__asm__ ("rev16 %0, %1" : "=r" (x) : "r" (x));
return x;
}
-#define __arch_swab16 __arch_swab16
+#define __arch_swahb32 __arch_swahb32
+#define __arch_swab16(x) ((__u16)__arch_swahb32(x))
static inline __attribute_const__ __u32 __arch_swab32(__u32 x)
{
}
#define __arch_swab32 __arch_swab32
- #else
+ #endif
+ #endif
+ #if !defined(__KERNEL__) || __LINUX_ARM_ARCH__ < 6
static inline __attribute_const__ __u32 __arch_swab32(__u32 x)
{
__u32 t;
* We don't use int-l64.h for the kernel anymore but still use it for
* userspace to avoid code changes.
*/
- #if (_MIPS_SZLONG == 64) && !defined(__KERNEL__)
- # include <asm-generic/int-l64.h>
- #else
+ #ifdef __KERNEL__
# include <asm-generic/int-ll64.h>
+ #else
+ # if _MIPS_SZLONG == 64
+ # include <asm-generic/int-l64.h>
+ # else
+ # include <asm-generic/int-ll64.h>
+ # endif
#endif
-#ifndef __ASSEMBLY__
-
-typedef unsigned short umode_t;
-
-#endif /* __ASSEMBLY__ */
-
/*
* These aren't exported outside the kernel to avoid name space clashes
*/