1 From 54139dfd773a22677e9a8f1e49c4123ed3a55f0b Mon Sep 17 00:00:00 2001
2 From: Ingo Molnar <mingo@elte.hu>
3 Date: Fri, 3 Jul 2009 08:30:27 -0500
4 Subject: [PATCH 099/366] stop_machine: convert stop_machine_run() to
7 Instead of playing with non-preemption, introduce explicit
8 startup serialization. This is more robust and cleaner as
11 Signed-off-by: Ingo Molnar <mingo@elte.hu>
12 Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 [bigeasy: XXX: stopper_lock -> stop_cpus_lock]
15 kernel/stop_machine.c | 10 ++++++++++
16 1 file changed, 10 insertions(+)
18 diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c
19 index a3bbaee..4ef69a3 100644
20 --- a/kernel/stop_machine.c
21 +++ b/kernel/stop_machine.c
22 @@ -450,6 +450,16 @@ repeat:
23 struct cpu_stop_done *done = work->done;
24 char ksym_buf[KSYM_NAME_LEN] __maybe_unused;
27 + * Wait until the stopper finished scheduling on all
30 + lg_global_lock(&stop_cpus_lock);
32 + * Let other cpu threads continue as well
34 + lg_global_unlock(&stop_cpus_lock);
36 /* cpu stop callbacks are not allowed to sleep */