aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/include/uapi/asm/swab.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/include/uapi/asm/swab.h')
-rw-r--r--arch/mips/include/uapi/asm/swab.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/mips/include/uapi/asm/swab.h b/arch/mips/include/uapi/asm/swab.h
index 97c2f81b4b43..ac9a8f9cd1fb 100644
--- a/arch/mips/include/uapi/asm/swab.h
+++ b/arch/mips/include/uapi/asm/swab.h
@@ -13,7 +13,7 @@
13 13
14#define __SWAB_64_THRU_32__ 14#define __SWAB_64_THRU_32__
15 15
16#ifdef CONFIG_CPU_MIPSR2 16#if defined(__mips_isa_rev) && (__mips_isa_rev >= 2)
17 17
18static inline __attribute_const__ __u16 __arch_swab16(__u16 x) 18static inline __attribute_const__ __u16 __arch_swab16(__u16 x)
19{ 19{
@@ -39,10 +39,10 @@ static inline __attribute_const__ __u32 __arch_swab32(__u32 x)
39#define __arch_swab32 __arch_swab32 39#define __arch_swab32 __arch_swab32
40 40
41/* 41/*
42 * Having already checked for CONFIG_CPU_MIPSR2, enable the 42 * Having already checked for MIPS R2, enable the optimized version for
43 * optimized version for 64-bit kernel on r2 CPUs. 43 * 64-bit kernel on r2 CPUs.
44 */ 44 */
45#ifdef CONFIG_64BIT 45#ifdef __mips64
46static inline __attribute_const__ __u64 __arch_swab64(__u64 x) 46static inline __attribute_const__ __u64 __arch_swab64(__u64 x)
47{ 47{
48 __asm__( 48 __asm__(
@@ -54,6 +54,6 @@ static inline __attribute_const__ __u64 __arch_swab64(__u64 x)
54 return x; 54 return x;
55} 55}
56#define __arch_swab64 __arch_swab64 56#define __arch_swab64 __arch_swab64
57#endif /* CONFIG_64BIT */ 57#endif /* __mips64 */
58#endif /* CONFIG_CPU_MIPSR2 */ 58#endif /* MIPS R2 or newer */
59#endif /* _ASM_SWAB_H */ 59#endif /* _ASM_SWAB_H */