diff options
Diffstat (limited to 'include/linux/smp.h')
-rw-r--r-- | include/linux/smp.h | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/include/linux/smp.h b/include/linux/smp.h index 6e7ba16ff454..715196b09d67 100644 --- a/include/linux/smp.h +++ b/include/linux/smp.h | |||
@@ -21,6 +21,12 @@ struct call_single_data { | |||
21 | u16 priv; | 21 | u16 priv; |
22 | }; | 22 | }; |
23 | 23 | ||
24 | /* total number of cpus in this system (may exceed NR_CPUS) */ | ||
25 | extern unsigned int total_cpus; | ||
26 | |||
27 | int smp_call_function_single(int cpuid, void (*func) (void *info), void *info, | ||
28 | int wait); | ||
29 | |||
24 | #ifdef CONFIG_SMP | 30 | #ifdef CONFIG_SMP |
25 | 31 | ||
26 | #include <linux/preempt.h> | 32 | #include <linux/preempt.h> |
@@ -64,19 +70,18 @@ extern void smp_cpus_done(unsigned int max_cpus); | |||
64 | * Call a function on all other processors | 70 | * Call a function on all other processors |
65 | */ | 71 | */ |
66 | int smp_call_function(void(*func)(void *info), void *info, int wait); | 72 | int smp_call_function(void(*func)(void *info), void *info, int wait); |
67 | /* Deprecated: use smp_call_function_many() which uses a cpumask ptr. */ | 73 | void smp_call_function_many(const struct cpumask *mask, |
68 | int smp_call_function_mask(cpumask_t mask, void(*func)(void *info), void *info, | 74 | void (*func)(void *info), void *info, bool wait); |
69 | int wait); | ||
70 | 75 | ||
71 | static inline void smp_call_function_many(const struct cpumask *mask, | 76 | /* Deprecated: Use smp_call_function_many which takes a pointer to the mask. */ |
72 | void (*func)(void *info), void *info, | 77 | static inline int |
73 | int wait) | 78 | smp_call_function_mask(cpumask_t mask, void(*func)(void *info), void *info, |
79 | int wait) | ||
74 | { | 80 | { |
75 | smp_call_function_mask(*mask, func, info, wait); | 81 | smp_call_function_many(&mask, func, info, wait); |
82 | return 0; | ||
76 | } | 83 | } |
77 | 84 | ||
78 | int smp_call_function_single(int cpuid, void (*func) (void *info), void *info, | ||
79 | int wait); | ||
80 | void __smp_call_function_single(int cpuid, struct call_single_data *data); | 85 | void __smp_call_function_single(int cpuid, struct call_single_data *data); |
81 | 86 | ||
82 | /* | 87 | /* |
@@ -136,14 +141,6 @@ static inline int up_smp_call_function(void (*func)(void *), void *info) | |||
136 | static inline void smp_send_reschedule(int cpu) { } | 141 | static inline void smp_send_reschedule(int cpu) { } |
137 | #define num_booting_cpus() 1 | 142 | #define num_booting_cpus() 1 |
138 | #define smp_prepare_boot_cpu() do {} while (0) | 143 | #define smp_prepare_boot_cpu() do {} while (0) |
139 | #define smp_call_function_single(cpuid, func, info, wait) \ | ||
140 | ({ \ | ||
141 | WARN_ON(cpuid != 0); \ | ||
142 | local_irq_disable(); \ | ||
143 | (func)(info); \ | ||
144 | local_irq_enable(); \ | ||
145 | 0; \ | ||
146 | }) | ||
147 | #define smp_call_function_mask(mask, func, info, wait) \ | 144 | #define smp_call_function_mask(mask, func, info, wait) \ |
148 | (up_smp_call_function(func, info)) | 145 | (up_smp_call_function(func, info)) |
149 | #define smp_call_function_many(mask, func, info, wait) \ | 146 | #define smp_call_function_many(mask, func, info, wait) \ |