linux-mips
[Top] [All Lists]

[PATCH 3/3] MIPS: Only set cpu_has_mmips if SYS_SUPPORTS_MICROMIPS

To: linux-mips@linux-mips.org, ralf@linux-mips.org
Subject: [PATCH 3/3] MIPS: Only set cpu_has_mmips if SYS_SUPPORTS_MICROMIPS
From: David Daney <ddaney.cavm@gmail.com>
Date: Fri, 24 May 2013 14:54:10 -0700
Cc: David Daney <david.daney@cavium.com>, Jonas Gorski <jogo@openwrt.org>, "Steven J. Hill" <Steven.Hill@imgtec.com>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=mddbPFGJeCnmstOI6k3iAwmS7tUTi3E5AWcsZpKG54I=; b=Ea+mXqRO8goxN9xR6pOhLZ0PPxA/86SF4ydRb3NuGDpmKAyqlyfnWMoimfIXOrjENm w5cyD84TVA/3qq2WbdbieLCU5qYHONGsJOlmU6eDUBd6/tvPOaNBJH7KDejbd+vAbmpP WDESgD2e5v/+ukYaunDw03GA8dcAb3Fy7hkJvHMIyvN553rwhJvhlMHs1XUCNPqr/wqk a1xYsUGLPgfbhWVrL4WjVwR6eEE3zNiGCkBQqZv6wIDYz3haZMoIOD+BvzrBHnpPHA1h iY/JDxJB5r1+kS28uyDmRt31lLVM3vZg6DXpfpz+vQjZIW+/XYMn1KtBEv9MwQblcdEu fwag==
In-reply-to: <1369432450-13583-1-git-send-email-ddaney.cavm@gmail.com>
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: <1369432450-13583-1-git-send-email-ddaney.cavm@gmail.com>
Sender: linux-mips-bounce@linux-mips.org
From: David Daney <david.daney@cavium.com>

As Jonas Gorske said in his patch:

   Disable cpu_has_mmips for everything but SEAD3 and MALTA. Most of
   these platforms are from before the micromips introduction, so they
   are very unlikely to implement it.

   Reduces an -Os compiled, uncompressed kernel image by 8KiB for
   BCM63XX.

This patch taks a different approach than his, we gate the runtime
test for microMIPS by the config symbol SYS_SUPPORTS_MICROMIPS.

Signed-off-by: David Daney <david.daney@cavium.com>
Cc: Jonas Gorski <jogo@openwrt.org>
Cc: Steven J. Hill <Steven.Hill@imgtec.com>
---
 arch/mips/include/asm/cpu-features.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/arch/mips/include/asm/cpu-features.h 
b/arch/mips/include/asm/cpu-features.h
index e5ec8fc..2cdfd24 100644
--- a/arch/mips/include/asm/cpu-features.h
+++ b/arch/mips/include/asm/cpu-features.h
@@ -99,7 +99,11 @@
 #define cpu_has_rixi           (cpu_data[0].options & MIPS_CPU_RIXI)
 #endif
 #ifndef cpu_has_mmips
-#define cpu_has_mmips          (cpu_data[0].options & MIPS_CPU_MICROMIPS)
+# ifdef CONFIG_SYS_SUPPORTS_MICROMIPS
+#  define cpu_has_mmips                (cpu_data[0].options & 
MIPS_CPU_MICROMIPS)
+# else
+#  define cpu_has_mmips                0
+# endif
 #endif
 #ifndef cpu_has_vtag_icache
 #define cpu_has_vtag_icache    (cpu_data[0].icache.flags & MIPS_CACHE_VTAG)
-- 
1.7.11.7


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