brcm63xx: switch to linux 3.10
[openwrt/svn-archive/archive.git] / target / linux / brcm63xx / patches-3.9 / 106-MIPS-bmips-add-a-helper-function-for-registering-smp.patch
1 From aa15ac91faccc3bf01a29670b1f9ae1945cea056 Mon Sep 17 00:00:00 2001
2 From: Jonas Gorski <jogo@openwrt.org>
3 Date: Sun, 23 Jun 2013 14:04:51 +0200
4 Subject: [PATCH 07/10] MIPS: bmips: add a helper function for registering smp
5 ops
6
7 Add a helper similar to the generic register_XXX_smp_ops() for bmips.
8
9 Signed-off-by: Jonas Gorski <jogo@openwrt.org>
10 ---
11 arch/mips/include/asm/bmips.h | 13 +++++++++++++
12 1 file changed, 13 insertions(+)
13
14 --- a/arch/mips/include/asm/bmips.h
15 +++ b/arch/mips/include/asm/bmips.h
16 @@ -47,6 +47,7 @@
17 #include <linux/cpumask.h>
18 #include <asm/cpu-features.h>
19 #include <asm/r4kcache.h>
20 +#include <asm/smp-ops.h>
21
22 #define cpu_is_bmips32() (current_cpu_type() == CPU_BMIPS32)
23 #define cpu_is_bmips3300() (IS_ENABLED(CONFIG_CPU_BMIPS3300) && \
24 @@ -59,6 +60,18 @@
25 current_cpu_type() == CPU_BMIPS5000)
26
27 extern struct plat_smp_ops bmips_smp_ops;
28 +
29 +static inline int register_bmips_smp_ops(void)
30 +{
31 +#ifdef CONFIG_CPU_BMIPS
32 + register_smp_ops(&bmips_smp_ops);
33 +
34 + return 0;
35 +#else
36 + return -ENODEV;
37 +#endif
38 +}
39 +
40 extern char bmips_reset_nmi_vec;
41 extern char bmips_reset_nmi_vec_end;
42 extern char bmips_smp_movevec;