b1eddc6ee7cf5e1615e3132564867b0342c7fbc2
[openwrt/staging/adrian.git] /
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
5
6 commit 3ddc14add5e6341cf8ef4058c34c67ba7fd15317 upstream.
7
8 As Jonas Gorske said in his patch:
9
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.
13
14 Reduces an -Os compiled, uncompressed kernel image by 8KiB for
15 BCM63XX.
16
17 This patch taks a different approach than his, we gate the runtime
18 test for microMIPS by the config symbol SYS_SUPPORTS_MICROMIPS.
19
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>
27 ---
28 arch/mips/include/asm/cpu-features.h | 6 +++++-
29 1 file changed, 5 insertions(+), 1 deletion(-)
30
31 --- a/arch/mips/include/asm/cpu-features.h
32 +++ b/arch/mips/include/asm/cpu-features.h
33 @@ -99,7 +99,11 @@
34 #define cpu_has_rixi (cpu_data[0].options & MIPS_CPU_RIXI)
35 #endif
36 #ifndef cpu_has_mmips
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)
40 +# else
41 +# define cpu_has_mmips 0
42 +# endif
43 #endif
44 #ifndef cpu_has_vtag_icache
45 #define cpu_has_vtag_icache (cpu_data[0].icache.flags & MIPS_CACHE_VTAG)