linux-mips
[Top] [All Lists]

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

To: ralf@linux-mips.org, Steven.Hill@imgtec.com, macro@linux-mips.org, david.daney@cavium.com, linux-mips@linux-mips.org
Subject: [PATCH v3 2/3] MIPS: microMIPS: Add kernel_uses_mmips in cpu-features.h
From: Tony Wu <tung7970@gmail.com>
Date: Mon, 27 May 2013 19:01:02 +0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=KAM+9qapHClnF1ABBH/wezvWrHFkh21XZJQs+evv3aE=; b=NKsg8kK8VgU4Aze+4waUc4llA6W4gfmn3tSkaxz+WbHplTsNx8vaGXyHicOOj73o3s 7UqiMBDL7PZsYWlFeRx0dMV0KLKDTrVfAII/ElHkJGvDljQ2kfVSs1XneEM82bF23kFy lvfCBdpTTfPx8tBd0zZYEluNLoHR8Ug3DNqviffwPoOVJn7L7Tw1EmNh3lST0T1xWSH2 voHf0WsDZiEcVxKgGdw9pEnyowo8BIrbiq77JpkCO4wEnZ+jTjQOocPehfTnGTvO9+GJ T90Bbqs5RNNBgL9RVZjc1by82WeXQAjvVCjG+GheUr0pEgaIXFJTPpCtdieO3tdWE1hg 7+gw==
In-reply-to: <20130527105810.GA31548@hades>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20130527105810.GA31548@hades>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.21 (2010-09-15)
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@gmail.com>
Cc: David Daney <david.daney@cavium.com>
Cc: Steven J. Hill <Steven.Hill@imgtec.com>
---
 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)

<Prev in Thread] Current Thread [Next in Thread>