提交 a52b1752 编写于 作者: A Avi Kivity

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 <ak@suse.de>
Signed-off-by: NAvi Kivity <avi@qumranet.com>
上级 de489353
......@@ -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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册