2 * Uniprocessor-only support functions. The counterpart to kernel/smp.c
5 #include <linux/interrupt.h>
6 #include <linux/kernel.h>
7 #include <linux/export.h>
10 int smp_call_function_single(int cpu, void (*func) (void *info), void *info,
21 EXPORT_SYMBOL(smp_call_function_single);
24 * Note we still need to test the mask even for UP
25 * because we actually can get an empty mask from
26 * code that on SMP might call us without the local
29 void on_each_cpu_mask(const struct cpumask *mask,
30 smp_call_func_t func, void *info, bool wait)
34 if (cpumask_test_cpu(0, mask)) {
35 local_irq_save(flags);
37 local_irq_restore(flags);
40 EXPORT_SYMBOL(on_each_cpu_mask);
43 * Preemption is disabled here to make sure the cond_func is called under the
44 * same condtions in UP and SMP.
46 void on_each_cpu_cond(bool (*cond_func)(int cpu, void *info),
47 smp_call_func_t func, void *info, bool wait,
53 if (cond_func(0, info)) {
54 local_irq_save(flags);
56 local_irq_restore(flags);
60 EXPORT_SYMBOL(on_each_cpu_cond);