]> git.hungrycats.org Git - linux/commitdiff
[PATCH] smp_call_function needs mb()
authorZwane Mwaikambo <zwane@linuxpower.ca>
Fri, 4 Apr 2003 12:08:15 +0000 (04:08 -0800)
committerLinus Torvalds <torvalds@home.transmeta.com>
Fri, 4 Apr 2003 12:08:15 +0000 (04:08 -0800)
We really need a memory barrier in smp_call_function(), so that the
other cpu's get the updated value when they get IPI'd immediately
afterwards.

This seems to be true on some old (and arguably broken) hardware where
the IPI generation and reception doesn't synchronize enough.

arch/i386/kernel/smp.c

index 7044332208860e45eeb78de451a31cfdd7e0d206..a7e159e6ba49db44efbd2f0b4dcfa72e6ed4dff5 100644 (file)
@@ -522,7 +522,8 @@ int smp_call_function (void (*func) (void *info), void *info, int nonatomic,
 
        spin_lock(&call_lock);
        call_data = &data;
-       wmb();
+       mb();
+       
        /* Send a message to all other CPUs and wait for them to respond */
        send_IPI_allbutself(CALL_FUNCTION_VECTOR);