Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=adff093d6c545c882f1503607f6af14ddd90bb89
Commit:     adff093d6c545c882f1503607f6af14ddd90bb89
Parent:     08ae6cc15db201fa20cc4893d9500c1f6b20e560
Author:     Avi Kivity <[EMAIL PROTECTED]>
AuthorDate: Fri Jul 20 01:33:48 2007 +1000
Committer:  Paul Mackerras <[EMAIL PROTECTED]>
CommitDate: Sun Jul 22 21:30:58 2007 +1000

    [POWERPC] 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: Paul Mackerras <[EMAIL PROTECTED]>
---
 arch/powerpc/kernel/smp.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index d577b71..087c92f 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -284,7 +284,7 @@ int smp_call_function_single(int cpu, void (*func) (void 
*info), void *info, int
                        int wait)
 {
        cpumask_t map = CPU_MASK_NONE;
-       int ret = -EBUSY;
+       int ret = 0;
 
        if (!cpu_online(cpu))
                return -EINVAL;
@@ -292,6 +292,11 @@ int smp_call_function_single(int cpu, void (*func) (void 
*info), void *info, int
        cpu_set(cpu, map);
        if (cpu != get_cpu())
                ret = smp_call_function_map(func,info,nonatomic,wait,map);
+       else {
+               local_irq_disable();
+               func(info);
+               local_irq_enable();
+       }
        put_cpu();
        return ret;
 }
-
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