diff options
| -rw-r--r-- | arch/mips/include/asm/swab.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/mips/include/asm/swab.h b/arch/mips/include/asm/swab.h index 99993c0d6c12..97c2f81b4b43 100644 --- a/arch/mips/include/asm/swab.h +++ b/arch/mips/include/asm/swab.h | |||
| @@ -38,7 +38,11 @@ static inline __attribute_const__ __u32 __arch_swab32(__u32 x) | |||
| 38 | } | 38 | } |
| 39 | #define __arch_swab32 __arch_swab32 | 39 | #define __arch_swab32 __arch_swab32 |
| 40 | 40 | ||
| 41 | #ifdef CONFIG_CPU_MIPS64_R2 | 41 | /* |
| 42 | * Having already checked for CONFIG_CPU_MIPSR2, enable the | ||
| 43 | * optimized version for 64-bit kernel on r2 CPUs. | ||
| 44 | */ | ||
| 45 | #ifdef CONFIG_64BIT | ||
| 42 | static inline __attribute_const__ __u64 __arch_swab64(__u64 x) | 46 | static inline __attribute_const__ __u64 __arch_swab64(__u64 x) |
| 43 | { | 47 | { |
| 44 | __asm__( | 48 | __asm__( |
| @@ -50,6 +54,6 @@ static inline __attribute_const__ __u64 __arch_swab64(__u64 x) | |||
| 50 | return x; | 54 | return x; |
| 51 | } | 55 | } |
| 52 | #define __arch_swab64 __arch_swab64 | 56 | #define __arch_swab64 __arch_swab64 |
| 53 | #endif /* CONFIG_CPU_MIPS64_R2 */ | 57 | #endif /* CONFIG_64BIT */ |
| 54 | #endif /* CONFIG_CPU_MIPSR2 */ | 58 | #endif /* CONFIG_CPU_MIPSR2 */ |
| 55 | #endif /* _ASM_SWAB_H */ | 59 | #endif /* _ASM_SWAB_H */ |
