]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
SMP: Allow smp_call_function_single() to current cpu
authorAvi Kivity <avi@qumranet.com>
Mon, 9 Jul 2007 14:11:49 +0000 (17:11 +0300)
committerAvi Kivity <avi@qumranet.com>
Mon, 16 Jul 2007 09:05:50 +0000 (12:05 +0300)
This removes the requirement for callers to get_cpu() to check in simple
cases.  This patch is for !CONFIG_SMP.

Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Avi Kivity <avi@qumranet.com>
include/linux/smp.h

index 96ac21f8dd735ae2db06d9f16048bec4c8e40a23..8039daced6888e2f4f1169c88e38bd1ff4ef44f5 100644 (file)
@@ -7,6 +7,7 @@
  */
 
 #include <linux/errno.h>
+#include <asm/system.h>
 
 extern void cpu_idle(void);
 
@@ -102,7 +103,11 @@ static inline void smp_send_reschedule(int cpu) { }
 static inline int smp_call_function_single(int cpuid, void (*func) (void *info),
                                           void *info, int retry, int wait)
 {
-       return -EBUSY;
+       WARN_ON(cpuid != 0);
+       local_irq_disable();
+       func(info);
+       local_irq_enable();
+       return 0;
 }
 
 #endif /* !SMP */