[PATCH v4 2/3] MIPS: microMIPS: Add kernel_uses_mmips in cpu-features.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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)



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux