summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZwane Mwaikambo <zwane@linuxpower.ca>2003-04-04 04:08:15 -0800
committerLinus Torvalds <torvalds@home.transmeta.com>2003-04-04 04:08:15 -0800
commit856eeb53b42ae2b01e22e4cc359471c4831cda2e (patch)
tree0f8be5a2d5f8b38944cb18b7bec42b84d1188b3b
parenta38298ec03e25b1ea2861c3233d24ecc083ae29c (diff)
[PATCH] smp_call_function needs mb()
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.
-rw-r--r--arch/i386/kernel/smp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/i386/kernel/smp.c b/arch/i386/kernel/smp.c
index 704433220886..a7e159e6ba49 100644
--- a/arch/i386/kernel/smp.c
+++ b/arch/i386/kernel/smp.c
@@ -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);