|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] Fix smp_call_function race (introduced a couple of days
ChangeSet 1.1677, 2005/06/05 15:56:51+01:00, kaf24@xxxxxxxxxxxxxxxxxxxx
Fix smp_call_function race (introduced a couple of days ago).
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
smp.c | 23 +++++++++++++++--------
1 files changed, 15 insertions(+), 8 deletions(-)
diff -Nru a/xen/arch/x86/smp.c b/xen/arch/x86/smp.c
--- a/xen/arch/x86/smp.c 2005-06-05 11:03:13 -04:00
+++ b/xen/arch/x86/smp.c 2005-06-05 11:03:13 -04:00
@@ -272,6 +272,7 @@
struct call_data_struct {
void (*func) (void *info);
void *info;
+ int wait;
atomic_t started;
atomic_t finished;
};
@@ -299,6 +300,7 @@
data.func = func;
data.info = info;
+ data.wait = wait;
atomic_set(&data.started, 0);
atomic_set(&data.finished, 0);
@@ -345,17 +347,22 @@
asmlinkage void smp_call_function_interrupt(void)
{
- void (*func) (void *info) = call_data->func;
+ void (*func)(void *info) = call_data->func;
void *info = call_data->info;
ack_APIC_irq();
perfc_incrc(ipis);
- mb();
- atomic_inc(&call_data->started);
-
- (*func)(info);
-
- mb();
- atomic_inc(&call_data->finished);
+ if ( call_data->wait )
+ {
+ (*func)(info);
+ mb();
+ atomic_inc(&call_data->finished);
+ }
+ else
+ {
+ mb();
+ atomic_inc(&call_data->started);
+ (*func)(info);
+ }
}
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] Fix smp_call_function race (introduced a couple of days ago).,
BitKeeper Bot <=
|
|
|
|
|