]> xenbits.xensource.com Git - legacy/linux-2.6.18-xen.git/commitdiff
linux/x86: Use cpu_relax() rather than barrier() in smp_call_function()
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 6 Dec 2007 16:02:51 +0000 (16:02 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 6 Dec 2007 16:02:51 +0000 (16:02 +0000)
Short of getting an explanation for the odd difference to native, make
the code match native (and also, in the case of x86-64,
__smp_call_function_single()).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
arch/i386/kernel/smp-xen.c
arch/x86_64/kernel/smp-xen.c

index 97511d3da54b6ecdcdb6c652eddda6d623706951..bd8ab43655839f85cd5684f042abf065c0383a78 100644 (file)
@@ -525,11 +525,11 @@ int smp_call_function (void (*func) (void *info), void *info, int nonatomic,
 
        /* Wait for response */
        while (atomic_read(&data.started) != cpus)
-               barrier();
+               cpu_relax();
 
        if (wait)
                while (atomic_read(&data.finished) != cpus)
-                       barrier();
+                       cpu_relax();
        spin_unlock(&call_lock);
 
        return 0;
index d78265cac56d58456f8751e35ea3a98b27a7908c..ffa54c2660ee626d1b5cdc6639878361b2967fe2 100644 (file)
@@ -421,21 +421,13 @@ static void __smp_call_function (void (*func) (void *info), void *info,
 
        /* Wait for response */
        while (atomic_read(&data.started) != cpus)
-#ifndef CONFIG_XEN
                cpu_relax();
-#else
-               barrier();
-#endif
 
        if (!wait)
                return;
 
        while (atomic_read(&data.finished) != cpus)
-#ifndef CONFIG_XEN
                cpu_relax();
-#else
-               barrier();
-#endif
 }
 
 /*