]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - include/linux/smp.h
lguest: the guest code
[karo-tx-linux.git] / include / linux / smp.h
index 3f70149eabbb2e7d40c91ce069cce466c3162615..259a13c3bd98eda779379be1c5df5e37aae6c73e 100644 (file)
@@ -6,6 +6,7 @@
  *             Alan Cox. <alan@redhat.com>
  */
 
+#include <linux/errno.h>
 
 extern void cpu_idle(void);
 
@@ -98,13 +99,14 @@ static inline int up_smp_call_function(void)
 static inline void smp_send_reschedule(int cpu) { }
 #define num_booting_cpus()                     1
 #define smp_prepare_boot_cpu()                 do {} while (0)
-static inline int smp_call_function_single(int cpuid, void (*func) (void *info),
-                               void *info, int retry, int wait)
-{
-       /* Disable interrupts here? */
-       func(info);
-       return 0;
-}
+#define smp_call_function_single(cpuid, func, info, retry, wait) \
+({ \
+       WARN_ON(cpuid != 0);    \
+       local_irq_disable();    \
+       (func)(info);           \
+       local_irq_enable();     \
+       0;                      \
+})
 
 #endif /* !SMP */