From: David Daney Date: Fri, 24 May 2013 20:54:10 +0000 (+0000) Subject: MIPS: Only set cpu_has_mmips if SYS_SUPPORTS_MICROMIPS X-Git-Tag: upstream/snapshot3+hdmi~4703^2~18 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3ddc14add5e6341cf8ef4058c34c67ba7fd15317;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git MIPS: Only set cpu_has_mmips if SYS_SUPPORTS_MICROMIPS 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 Cc: Jonas Gorski Cc: Steven J. Hill Acked-by: Steven J. Hill Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/5327/ Signed-off-by: Ralf Baechle --- diff --git a/arch/mips/include/asm/cpu-features.h b/arch/mips/include/asm/cpu-features.h index 9609812..8e0c125 100644 --- a/arch/mips/include/asm/cpu-features.h +++ b/arch/mips/include/asm/cpu-features.h @@ -109,7 +109,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)