[PATCH 07/10] MIPS: bmips: add a helper function for registering smp ops

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add a helper similar to the generic register_XXX_smp_ops() for bmips.

Signed-off-by: Jonas Gorski <jogo@xxxxxxxxxxx>
---
 arch/mips/include/asm/bmips.h |   13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/arch/mips/include/asm/bmips.h b/arch/mips/include/asm/bmips.h
index 8906ac3..1eb4628 100644
--- a/arch/mips/include/asm/bmips.h
+++ b/arch/mips/include/asm/bmips.h
@@ -47,6 +47,7 @@
 #include <linux/cpumask.h>
 #include <asm/cpu-features.h>
 #include <asm/r4kcache.h>
+#include <asm/smp-ops.h>
 
 #define cpu_is_bmips32()	(current_cpu_type() == CPU_BMIPS32)
 #define cpu_is_bmips3300()	(IS_ENABLED(CONFIG_CPU_BMIPS3300) && \
@@ -59,6 +60,18 @@
 				 current_cpu_type() == CPU_BMIPS5000)
 
 extern struct plat_smp_ops bmips_smp_ops;
+
+static inline int register_bmips_smp_ops(void)
+{
+#ifdef CONFIG_CPU_BMIPS
+	register_smp_ops(&bmips_smp_ops);
+
+	return 0;
+#else
+	return -ENODEV;
+#endif
+}
+
 extern char bmips_reset_nmi_vec;
 extern char bmips_reset_nmi_vec_end;
 extern char bmips_smp_movevec;
-- 
1.7.10.4



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux