aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/kernel/smp.c
diff options
context:
space:
mode:
authorAvi Kivity <avi@qumranet.com>2007-07-19 11:32:43 -0400
committerTony Luck <tony.luck@intel.com>2007-07-30 19:26:45 -0400
commit8a2d8693054a6cd86cc959576322b30e66e31208 (patch)
tree7aeb38a7dbaba8ee78289450b650504a5cc7fe61 /arch/ia64/kernel/smp.c
parent056e6d89aab51babaa5f75c16832b19c55a68bc4 (diff)
[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: Avi Kivity <avi@qumranet.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch/ia64/kernel/smp.c')
-rw-r--r--arch/ia64/kernel/smp.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/ia64/kernel/smp.c b/arch/ia64/kernel/smp.c
index 0982882bfb80..4e446aa5f4ac 100644
--- a/arch/ia64/kernel/smp.c
+++ b/arch/ia64/kernel/smp.c
@@ -346,7 +346,7 @@ smp_flush_tlb_mm (struct mm_struct *mm)
346} 346}
347 347
348/* 348/*
349 * Run a function on another CPU 349 * Run a function on a specific CPU
350 * <func> The function to run. This must be fast and non-blocking. 350 * <func> The function to run. This must be fast and non-blocking.
351 * <info> An arbitrary pointer to pass to the function. 351 * <info> An arbitrary pointer to pass to the function.
352 * <nonatomic> Currently unused. 352 * <nonatomic> Currently unused.
@@ -366,9 +366,11 @@ smp_call_function_single (int cpuid, void (*func) (void *info), void *info, int
366 int me = get_cpu(); /* prevent preemption and reschedule on another processor */ 366 int me = get_cpu(); /* prevent preemption and reschedule on another processor */
367 367
368 if (cpuid == me) { 368 if (cpuid == me) {
369 printk(KERN_INFO "%s: trying to call self\n", __FUNCTION__); 369 local_irq_disable();
370 func(info);
371 local_irq_enable();
370 put_cpu(); 372 put_cpu();
371 return -EBUSY; 373 return 0;
372 } 374 }
373 375
374 data.func = func; 376 data.func = func;