diff options
Diffstat (limited to 'arch/mips/include/asm/smp-ops.h')
-rw-r--r-- | arch/mips/include/asm/smp-ops.h | 43 |
1 files changed, 40 insertions, 3 deletions
diff --git a/arch/mips/include/asm/smp-ops.h b/arch/mips/include/asm/smp-ops.h index 9e09af34c8a8..ef2a8041e78b 100644 --- a/arch/mips/include/asm/smp-ops.h +++ b/arch/mips/include/asm/smp-ops.h | |||
@@ -11,6 +11,8 @@ | |||
11 | #ifndef __ASM_SMP_OPS_H | 11 | #ifndef __ASM_SMP_OPS_H |
12 | #define __ASM_SMP_OPS_H | 12 | #define __ASM_SMP_OPS_H |
13 | 13 | ||
14 | #include <linux/errno.h> | ||
15 | |||
14 | #ifdef CONFIG_SMP | 16 | #ifdef CONFIG_SMP |
15 | 17 | ||
16 | #include <linux/cpumask.h> | 18 | #include <linux/cpumask.h> |
@@ -56,8 +58,43 @@ static inline void register_smp_ops(struct plat_smp_ops *ops) | |||
56 | 58 | ||
57 | #endif /* !CONFIG_SMP */ | 59 | #endif /* !CONFIG_SMP */ |
58 | 60 | ||
59 | extern struct plat_smp_ops up_smp_ops; | 61 | static inline int register_up_smp_ops(void) |
60 | extern struct plat_smp_ops cmp_smp_ops; | 62 | { |
61 | extern struct plat_smp_ops vsmp_smp_ops; | 63 | #ifdef CONFIG_SMP_UP |
64 | extern struct plat_smp_ops up_smp_ops; | ||
65 | |||
66 | register_smp_ops(&up_smp_ops); | ||
67 | |||
68 | return 0; | ||
69 | #else | ||
70 | return -ENODEV; | ||
71 | #endif | ||
72 | } | ||
73 | |||
74 | static inline int register_cmp_smp_ops(void) | ||
75 | { | ||
76 | #ifdef CONFIG_MIPS_CMP | ||
77 | extern struct plat_smp_ops cmp_smp_ops; | ||
78 | |||
79 | register_smp_ops(&cmp_smp_ops); | ||
80 | |||
81 | return 0; | ||
82 | #else | ||
83 | return -ENODEV; | ||
84 | #endif | ||
85 | } | ||
86 | |||
87 | static inline int register_vsmp_smp_ops(void) | ||
88 | { | ||
89 | #ifdef CONFIG_MIPS_MT_SMP | ||
90 | extern struct plat_smp_ops vsmp_smp_ops; | ||
91 | |||
92 | register_smp_ops(&vsmp_smp_ops); | ||
93 | |||
94 | return 0; | ||
95 | #else | ||
96 | return -ENODEV; | ||
97 | #endif | ||
98 | } | ||
62 | 99 | ||
63 | #endif /* __ASM_SMP_OPS_H */ | 100 | #endif /* __ASM_SMP_OPS_H */ |