aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/smp.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/smp.h')
-rw-r--r--include/linux/smp.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/include/linux/smp.h b/include/linux/smp.h
index 76bb3e45351f..f86d40768e7f 100644
--- a/include/linux/smp.h
+++ b/include/linux/smp.h
@@ -76,6 +76,9 @@ void smp_call_function_many(const struct cpumask *mask,
76void __smp_call_function_single(int cpuid, struct call_single_data *data, 76void __smp_call_function_single(int cpuid, struct call_single_data *data,
77 int wait); 77 int wait);
78 78
79int smp_call_function_any(const struct cpumask *mask,
80 void (*func)(void *info), void *info, int wait);
81
79/* 82/*
80 * sends a 'pull timer' event to a remote CPU 83 * sends a 'pull timer' event to a remote CPU
81 */ 84 */
@@ -142,15 +145,21 @@ static inline void smp_send_reschedule(int cpu) { }
142#define smp_prepare_boot_cpu() do {} while (0) 145#define smp_prepare_boot_cpu() do {} while (0)
143#define smp_call_function_many(mask, func, info, wait) \ 146#define smp_call_function_many(mask, func, info, wait) \
144 (up_smp_call_function(func, info)) 147 (up_smp_call_function(func, info))
145static inline void init_call_single_data(void) 148static inline void init_call_single_data(void) { }
149
150static inline int
151smp_call_function_any(const struct cpumask *mask, void (*func)(void *info),
152 void *info, int wait)
146{ 153{
154 return smp_call_function_single(0, func, info, wait);
147} 155}
156
148#endif /* !SMP */ 157#endif /* !SMP */
149 158
150/* 159/*
151 * smp_processor_id(): get the current CPU ID. 160 * smp_processor_id(): get the current CPU ID.
152 * 161 *
153 * if DEBUG_PREEMPT is enabled the we check whether it is 162 * if DEBUG_PREEMPT is enabled then we check whether it is
154 * used in a preemption-safe way. (smp_processor_id() is safe 163 * used in a preemption-safe way. (smp_processor_id() is safe
155 * if it's used in a preemption-off critical section, or in 164 * if it's used in a preemption-off critical section, or in
156 * a thread that is bound to the current CPU.) 165 * a thread that is bound to the current CPU.)