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.h35
1 files changed, 33 insertions, 2 deletions
diff --git a/include/linux/smp.h b/include/linux/smp.h
index 55232ccf9cfd..eac3e062250f 100644
--- a/include/linux/smp.h
+++ b/include/linux/smp.h
@@ -7,9 +7,19 @@
7 */ 7 */
8 8
9#include <linux/errno.h> 9#include <linux/errno.h>
10#include <linux/list.h>
11#include <linux/spinlock.h>
12#include <linux/cpumask.h>
10 13
11extern void cpu_idle(void); 14extern void cpu_idle(void);
12 15
16struct call_single_data {
17 struct list_head list;
18 void (*func) (void *info);
19 void *info;
20 unsigned int flags;
21};
22
13#ifdef CONFIG_SMP 23#ifdef CONFIG_SMP
14 24
15#include <linux/preempt.h> 25#include <linux/preempt.h>
@@ -53,9 +63,28 @@ extern void smp_cpus_done(unsigned int max_cpus);
53 * Call a function on all other processors 63 * Call a function on all other processors
54 */ 64 */
55int smp_call_function(void(*func)(void *info), void *info, int retry, int wait); 65int smp_call_function(void(*func)(void *info), void *info, int retry, int wait);
56 66int smp_call_function_mask(cpumask_t mask, void(*func)(void *info), void *info,
67 int wait);
57int smp_call_function_single(int cpuid, void (*func) (void *info), void *info, 68int smp_call_function_single(int cpuid, void (*func) (void *info), void *info,
58 int retry, int wait); 69 int retry, int wait);
70void __smp_call_function_single(int cpuid, struct call_single_data *data);
71
72/*
73 * Generic and arch helpers
74 */
75#ifdef CONFIG_USE_GENERIC_SMP_HELPERS
76void generic_smp_call_function_single_interrupt(void);
77void generic_smp_call_function_interrupt(void);
78void init_call_single_data(void);
79void ipi_call_lock(void);
80void ipi_call_unlock(void);
81void ipi_call_lock_irq(void);
82void ipi_call_unlock_irq(void);
83#else
84static inline void init_call_single_data(void)
85{
86}
87#endif
59 88
60/* 89/*
61 * Call a function on all processors 90 * Call a function on all processors
@@ -112,7 +141,9 @@ static inline void smp_send_reschedule(int cpu) { }
112}) 141})
113#define smp_call_function_mask(mask, func, info, wait) \ 142#define smp_call_function_mask(mask, func, info, wait) \
114 (up_smp_call_function(func, info)) 143 (up_smp_call_function(func, info))
115 144static inline void init_call_single_data(void)
145{
146}
116#endif /* !SMP */ 147#endif /* !SMP */
117 148
118/* 149/*