stop_machine: convert stop_machine_run() to PREEMPT_RT

Instead of playing with non-preemption, introduce explicit
startup serialization. This is more robust and cleaner as
well.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
[bigeasy: XXX: stopper_lock -> stop_cpus_lock]
This commit is contained in:
Ingo Molnar 2009-07-03 08:30:27 -05:00 committed by Alibek Omarov
parent 561f7f9847
commit cc61342abb
1 changed files with 10 additions and 0 deletions

View File

@ -466,6 +466,16 @@ repeat:
struct cpu_stop_done *done = work->done;
char ksym_buf[KSYM_NAME_LEN] __maybe_unused;
/*
* Wait until the stopper finished scheduling on all
* cpus
*/
lg_global_lock(&stop_cpus_lock);
/*
* Let other cpu threads continue as well
*/
lg_global_unlock(&stop_cpus_lock);
/* cpu stop callbacks are not allowed to sleep */
preempt_disable();