Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a52b1752c077cb919b71167c54968a0b91673281 Commit: a52b1752c077cb919b71167c54968a0b91673281 Parent: de489353918139161eee241a6224d67f22bfd024 Author: Avi Kivity <[EMAIL PROTECTED]> AuthorDate: Mon Jul 9 17:11:49 2007 +0300 Committer: Avi Kivity <[EMAIL PROTECTED]> CommitDate: Mon Jul 16 12:05:50 2007 +0300
SMP: Allow smp_call_function_single() to current cpu This removes the requirement for callers to get_cpu() to check in simple cases. This patch is for !CONFIG_SMP. Cc: Andi Kleen <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- include/linux/smp.h | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/include/linux/smp.h b/include/linux/smp.h index 96ac21f..8039dac 100644 --- a/include/linux/smp.h +++ b/include/linux/smp.h @@ -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 */ - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html