aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm63xx/patches-3.10/102-MIPS-bmips-add-macros-for-testing-the-current-bmips-.patch
diff options
context:
space:
mode:
authorJonas Gorski <jogo@openwrt.org>2013-07-20 11:30:26 +0000
committerJonas Gorski <jogo@openwrt.org>2013-07-20 11:30:26 +0000
commit2f038ae881a80ac4edf5a5e5f16e6c6cf4faaa9c (patch)
tree97aa81a655299693d0ea0196efb50a79a13d7566 /target/linux/brcm63xx/patches-3.10/102-MIPS-bmips-add-macros-for-testing-the-current-bmips-.patch
parentc38dd0ac480380e45436ff89a8b5a0ba4d7a981b (diff)
downloadmaster-187ad058-2f038ae881a80ac4edf5a5e5f16e6c6cf4faaa9c.tar.gz
master-187ad058-2f038ae881a80ac4edf5a5e5f16e6c6cf4faaa9c.tar.bz2
master-187ad058-2f038ae881a80ac4edf5a5e5f16e6c6cf4faaa9c.zip
brcm63xx: add linux 3.10 support
Signed-off-by: Jonas Gorski <jogo@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37481 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/brcm63xx/patches-3.10/102-MIPS-bmips-add-macros-for-testing-the-current-bmips-.patch')
-rw-r--r--target/linux/brcm63xx/patches-3.10/102-MIPS-bmips-add-macros-for-testing-the-current-bmips-.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/target/linux/brcm63xx/patches-3.10/102-MIPS-bmips-add-macros-for-testing-the-current-bmips-.patch b/target/linux/brcm63xx/patches-3.10/102-MIPS-bmips-add-macros-for-testing-the-current-bmips-.patch
new file mode 100644
index 0000000000..af38b35689
--- /dev/null
+++ b/target/linux/brcm63xx/patches-3.10/102-MIPS-bmips-add-macros-for-testing-the-current-bmips-.patch
@@ -0,0 +1,36 @@
+From 971b8b3d5101b3bb868e63f3eb96fe69b7110c61 Mon Sep 17 00:00:00 2001
+From: Jonas Gorski <jogo@openwrt.org>
+Date: Thu, 27 Jun 2013 12:40:15 +0200
+Subject: [PATCH 03/10] MIPS: bmips: add macros for testing the current bmips
+ CPU
+
+Makes it easy to make code conditionally compiled for supported CPUs
+without directly relying on #ifdefs.
+
+Signed-off-by: Jonas Gorski <jogo@openwrt.org>
+---
+ arch/mips/include/asm/bmips.h | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+--- a/arch/mips/include/asm/bmips.h
++++ b/arch/mips/include/asm/bmips.h
+@@ -45,8 +45,19 @@
+ #if !defined(__ASSEMBLY__)
+
+ #include <linux/cpumask.h>
++#include <asm/cpu-features.h>
+ #include <asm/r4kcache.h>
+
++#define cpu_is_bmips32() (current_cpu_type() == CPU_BMIPS32)
++#define cpu_is_bmips3300() (IS_ENABLED(CONFIG_CPU_BMIPS3300) && \
++ current_cpu_type() == CPU_BMIPS3300)
++#define cpu_is_bmips4350() (IS_ENABLED(CONFIG_CPU_BMIPS4350) && \
++ current_cpu_type() == CPU_BMIPS4350)
++#define cpu_is_bmips4380() (IS_ENABLED(CONFIG_CPU_BMIPS4380) && \
++ current_cpu_type() == CPU_BMIPS4380)
++#define cpu_is_bmips5000() (IS_ENABLED(CONFIG_CPU_BMIPS5000) && \
++ current_cpu_type() == CPU_BMIPS5000)
++
+ extern struct plat_smp_ops bmips_smp_ops;
+ extern char bmips_reset_nmi_vec;
+ extern char bmips_reset_nmi_vec_end;