Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

MIPS: <uapi/asm/swab.h>: Don't reference CONFIG_* symbols.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

+6 -6
+6 -6
arch/mips/include/uapi/asm/swab.h
··· 13 13 14 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 18 18 static inline __attribute_const__ __u16 __arch_swab16(__u16 x) 19 19 { ··· 39 39 #define __arch_swab32 __arch_swab32 40 40 41 41 /* 42 - * Having already checked for CONFIG_CPU_MIPSR2, enable the 43 - * optimized version for 64-bit kernel on r2 CPUs. 42 + * Having already checked for MIPS R2, enable the optimized version for 43 + * 64-bit kernel on r2 CPUs. 44 44 */ 45 - #ifdef CONFIG_64BIT 45 + #ifdef __mips64 46 46 static inline __attribute_const__ __u64 __arch_swab64(__u64 x) 47 47 { 48 48 __asm__( ··· 54 54 return x; 55 55 } 56 56 #define __arch_swab64 __arch_swab64 57 - #endif /* CONFIG_64BIT */ 58 - #endif /* CONFIG_CPU_MIPSR2 */ 57 + #endif /* __mips64 */ 58 + #endif /* MIPS R2 or newer */ 59 59 #endif /* _ASM_SWAB_H */