Skip to content

Commit

Permalink
Let smp_call_function_single return -EBUSY on UP
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Heiko Carstens authored and Linus Torvalds committed May 17, 2007
1 parent 8317f14 commit 79974a0
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions include/linux/smp.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Alan Cox. <alan@redhat.com>
*/

#include <linux/errno.h>

extern void cpu_idle(void);

Expand Down Expand Up @@ -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 */
Expand Down

0 comments on commit 79974a0

Please sign in to comment.