diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2013-07-20 10:14:05 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2013-07-20 10:14:05 +0000 |
commit | 536b42b75d5f800534d2a32701f72250855dc2b8 (patch) | |
tree | 061dea9385974b3f7f9a7e37c9eb6a24734990a6 /target/linux/generic/patches-3.10/002-MIPS-Only-set-cpu_has_mmips-if-SYS_SUPPORTS_MICROMIP.patch | |
parent | 05f9f140c08bcef9467e9ac29c3c8c01c3f36933 (diff) | |
download | upstream-536b42b75d5f800534d2a32701f72250855dc2b8.tar.gz upstream-536b42b75d5f800534d2a32701f72250855dc2b8.tar.bz2 upstream-536b42b75d5f800534d2a32701f72250855dc2b8.zip |
kernel/3.10: add a generic patch for cpu_has_mmips override
Backport of commit 3ddc14add5e6341cf8ef4058c34c67ba7fd15317
from 3.11-rc1
Suggested-by: Jonas Gorski <jogo@openwrt.org>
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37479 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic/patches-3.10/002-MIPS-Only-set-cpu_has_mmips-if-SYS_SUPPORTS_MICROMIP.patch')
-rw-r--r-- | target/linux/generic/patches-3.10/002-MIPS-Only-set-cpu_has_mmips-if-SYS_SUPPORTS_MICROMIP.patch | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/target/linux/generic/patches-3.10/002-MIPS-Only-set-cpu_has_mmips-if-SYS_SUPPORTS_MICROMIP.patch b/target/linux/generic/patches-3.10/002-MIPS-Only-set-cpu_has_mmips-if-SYS_SUPPORTS_MICROMIP.patch new file mode 100644 index 0000000000..b1eddc6ee7 --- /dev/null +++ b/target/linux/generic/patches-3.10/002-MIPS-Only-set-cpu_has_mmips-if-SYS_SUPPORTS_MICROMIP.patch @@ -0,0 +1,45 @@ +From 15a051ad98309f71989f9bda4b020fff160f4022 Mon Sep 17 00:00:00 2001 +From: David Daney <david.daney@cavium.com> +Date: Fri, 24 May 2013 20:54:10 +0000 +Subject: [PATCH 2/2] MIPS: Only set cpu_has_mmips if SYS_SUPPORTS_MICROMIPS + +commit 3ddc14add5e6341cf8ef4058c34c67ba7fd15317 upstream. + +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> +Acked-by: Steven J. Hill <Steven.Hill@imgtec.com> +Cc: linux-mips@linux-mips.org +Patchwork: https://patchwork.linux-mips.org/patch/5327/ +Signed-off-by: Ralf Baechle <ralf@linux-mips.org> +--- + arch/mips/include/asm/cpu-features.h | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +--- 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) |