Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8a2d8693054a6cd86cc959576322b30e66e31208
Commit:     8a2d8693054a6cd86cc959576322b30e66e31208
Parent:     056e6d89aab51babaa5f75c16832b19c55a68bc4
Author:     Avi Kivity <[EMAIL PROTECTED]>
AuthorDate: Thu Jul 19 18:32:43 2007 +0300
Committer:  Tony Luck <[EMAIL PROTECTED]>
CommitDate: Mon Jul 30 16:26:45 2007 -0700

    [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 <[EMAIL PROTECTED]>
    Signed-off-by: Tony Luck <[EMAIL PROTECTED]>
---
 arch/ia64/kernel/smp.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/arch/ia64/kernel/smp.c b/arch/ia64/kernel/smp.c
index 0982882..4e446aa 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)
 }
 
 /*
- * 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;
-
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

Reply via email to