Add kernel_uses_mmips to denote whether CONFIG_CPU_MICROMIPS is set or not. This variable can help cut down #ifdef usage. Signed-off-by: Tony Wu <tung7970@xxxxxxxxx> Cc: David Daney <david.daney@xxxxxxxxxx> Cc: Steven J. Hill <Steven.Hill@xxxxxxxxxx> --- arch/mips/include/asm/cpu-features.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/mips/include/asm/cpu-features.h b/arch/mips/include/asm/cpu-features.h index e5ec8fc..dc7e94f 100644 --- a/arch/mips/include/asm/cpu-features.h +++ b/arch/mips/include/asm/cpu-features.h @@ -101,6 +101,13 @@ #ifndef cpu_has_mmips #define cpu_has_mmips (cpu_data[0].options & MIPS_CPU_MICROMIPS) #endif +#ifndef kernel_uses_mmips +# ifdef CONFIG_CPU_MICROMIPS +# define kernel_uses_mmips 1 +# else +# define kernel_uses_mmips 0 +# endif +#endif #ifndef cpu_has_vtag_icache #define cpu_has_vtag_icache (cpu_data[0].icache.flags & MIPS_CACHE_VTAG) #endif -- 1.7.10.2 (Apple Git-33)