1 From 15a051ad98309f71989f9bda4b020fff160f4022 Mon Sep 17 00:00:00 2001
2 From: David Daney <david.daney@cavium.com>
3 Date: Fri, 24 May 2013 20:54:10 +0000
4 Subject: [PATCH 2/2] MIPS: Only set cpu_has_mmips if SYS_SUPPORTS_MICROMIPS
6 commit 3ddc14add5e6341cf8ef4058c34c67ba7fd15317 upstream.
8 As Jonas Gorske said in his patch:
10 Disable cpu_has_mmips for everything but SEAD3 and MALTA. Most of
11 these platforms are from before the micromips introduction, so they
12 are very unlikely to implement it.
14 Reduces an -Os compiled, uncompressed kernel image by 8KiB for
17 This patch taks a different approach than his, we gate the runtime
18 test for microMIPS by the config symbol SYS_SUPPORTS_MICROMIPS.
20 Signed-off-by: David Daney <david.daney@cavium.com>
21 Cc: Jonas Gorski <jogo@openwrt.org>
22 Cc: Steven J. Hill <Steven.Hill@imgtec.com>
23 Acked-by: Steven J. Hill <Steven.Hill@imgtec.com>
24 Cc: linux-mips@linux-mips.org
25 Patchwork: https://patchwork.linux-mips.org/patch/5327/
26 Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
28 arch/mips/include/asm/cpu-features.h | 6 +++++-
29 1 file changed, 5 insertions(+), 1 deletion(-)
31 --- a/arch/mips/include/asm/cpu-features.h
32 +++ b/arch/mips/include/asm/cpu-features.h
34 #define cpu_has_rixi (cpu_data[0].options & MIPS_CPU_RIXI)
37 -#define cpu_has_mmips (cpu_data[0].options & MIPS_CPU_MICROMIPS)
38 +# ifdef CONFIG_SYS_SUPPORTS_MICROMIPS
39 +# define cpu_has_mmips (cpu_data[0].options & MIPS_CPU_MICROMIPS)
41 +# define cpu_has_mmips 0
44 #ifndef cpu_has_vtag_icache
45 #define cpu_has_vtag_icache (cpu_data[0].icache.flags & MIPS_CACHE_VTAG)