linux-mips
[Top] [All Lists]

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

To: ralf@linux-mips.org, macro@linux-mips.org, Steven.Hill@imgtec.com, david.daney@cavium.com, linux-mips@linux-mips.org
Subject: [PATCH v4 2/3] MIPS: microMIPS: Add kernel_uses_mmips in cpu-features.h
From: Tony Wu <tung7970@gmail.com>
Date: Mon, 27 May 2013 20:45:57 +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=LC4RvHFml01oE2BgrEv7o9n+/BbPr6jAh7mF1OA1xE3bDowBmlVNub1VU3AqWNfONT qWTdzvePAxYwYWQJ50LcKar2V47q8ywNvTKA7O3GfCWm4EmY8mNvw+9TVodhKD5a8rkx vxm3pVoNum9Y5odAbP8FTac1mjWMzVZhg6fzfWaclTfdLPzKGapoFq73JfBBClxN0Gko xpHnI49s2bOiP0f1bvUJDKVf4fEB7EWKGCgmZLNqQuB1llVtaWGcsNEd4vsTCDHEgKtJ BkSCiEhgepNdqQ7hQZgVji5Adg6ujiSFa8Rjnyk0E6NmX/T0HzzGB5B9GRoioTWa0ziX 8qpQ==
In-reply-to: <20130527124421.GA32322@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: <20130527124421.GA32322@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>