[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [linux-2.6.18-xen] Imported patch git-5ee7737379b1d7f0c977c0f1661fbaf01a8d4721.patch from xen-unstable.hg 15200:bd3d6b4c52ec



# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxxxxx>
# Date 1180947924 -3600
# Node ID 42f6970e18c9d339a78789e1a3e50b4cb948d99a
# Parent  9686234c9d46e652d43685415329d12b8e3344dc
Imported patch git-5ee7737379b1d7f0c977c0f1661fbaf01a8d4721.patch from 
xen-unstable.hg 15200:bd3d6b4c52ec
---
 arch/ia64/kernel/smp.c |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff -r 9686234c9d46 -r 42f6970e18c9 arch/ia64/kernel/smp.c
--- a/arch/ia64/kernel/smp.c    Mon Jun 04 10:05:24 2007 +0100
+++ b/arch/ia64/kernel/smp.c    Mon Jun 04 10:05:24 2007 +0100
@@ -328,10 +328,14 @@ smp_call_function (void (*func) (void *i
 smp_call_function (void (*func) (void *info), void *info, int nonatomic, int 
wait)
 {
        struct call_data_struct data;
-       int cpus = num_online_cpus()-1;
-
-       if (!cpus)
+       int cpus;
+
+       spin_lock(&call_lock);
+       cpus = num_online_cpus()-1;
+       if (!cpus) {
+               spin_unlock(&call_lock);
                return 0;
+       }
 
        /* Can deadlock when called with interrupts disabled */
        WARN_ON(irqs_disabled());
@@ -343,8 +347,6 @@ smp_call_function (void (*func) (void *i
        if (wait)
                atomic_set(&data.finished, 0);
 
-       spin_lock(&call_lock);
-
        call_data = &data;
        mb();   /* ensure store to call_data precedes setting of IPI_CALL_FUNC 
*/
        send_IPI_allbutself(IPI_CALL_FUNC);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.