]> err.no Git - linux-2.6/commitdiff
Let smp_call_function_single return -EBUSY on UP
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Thu, 17 May 2007 05:11:09 +0000 (22:11 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Thu, 17 May 2007 12:23:04 +0000 (05:23 -0700)
All architectures that have an implementation of smp_call_function_single
let it return -EBUSY if it is asked to execute func on the current cpu.
(akpm: except for x86_64).  Therefore the UP version must always return
-EBUSY.

[akpm@linux-foundation.org: build fix]
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/smp.h

index 3f70149eabbb2e7d40c91ce069cce466c3162615..96ac21f8dd735ae2db06d9f16048bec4c8e40a23 100644 (file)
@@ -6,6 +6,7 @@
  *             Alan Cox. <alan@redhat.com>
  */
 
+#include <linux/errno.h>
 
 extern void cpu_idle(void);
 
@@ -99,11 +100,9 @@ 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)
+                                          void *info, int retry, int wait)
 {
-       /* Disable interrupts here? */
-       func(info);
-       return 0;
+       return -EBUSY;
 }
 
 #endif /* !SMP */