提交 8a2d8693 编写于 作者: A Avi Kivity 提交者: Tony Luck

[IA64] Allow smp_call_function_single() to current cpu

This removes the requirement for callers to get_cpu() to check in simple
cases.  i386 and x86_64 already received a similar treatment.
Signed-off-by: NAvi Kivity <avi@qumranet.com>
Signed-off-by: NTony Luck <tony.luck@intel.com>
上级 056e6d89
......@@ -346,7 +346,7 @@ smp_flush_tlb_mm (struct mm_struct *mm)
}
/*
* Run a function on another CPU
* Run a function on a specific CPU
* <func> The function to run. This must be fast and non-blocking.
* <info> An arbitrary pointer to pass to the function.
* <nonatomic> Currently unused.
......@@ -366,9 +366,11 @@ smp_call_function_single (int cpuid, void (*func) (void *info), void *info, int
int me = get_cpu(); /* prevent preemption and reschedule on another processor */
if (cpuid == me) {
printk(KERN_INFO "%s: trying to call self\n", __FUNCTION__);
local_irq_disable();
func(info);
local_irq_enable();
put_cpu();
return -EBUSY;
return 0;
}
data.func = func;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册