Commit 856eeb53 authored by Zwane Mwaikambo's avatar Zwane Mwaikambo Committed by Linus Torvalds

[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.
parent a38298ec
...@@ -522,7 +522,8 @@ int smp_call_function (void (*func) (void *info), void *info, int nonatomic, ...@@ -522,7 +522,8 @@ int smp_call_function (void (*func) (void *info), void *info, int nonatomic,
spin_lock(&call_lock); spin_lock(&call_lock);
call_data = &data; call_data = &data;
wmb(); mb();
/* Send a message to all other CPUs and wait for them to respond */ /* Send a message to all other CPUs and wait for them to respond */
send_IPI_allbutself(CALL_FUNCTION_VECTOR); send_IPI_allbutself(CALL_FUNCTION_VECTOR);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment