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:
parent
561f7f9847
commit
cc61342abb
|
@ -466,6 +466,16 @@ repeat:
|
||||||
struct cpu_stop_done *done = work->done;
|
struct cpu_stop_done *done = work->done;
|
||||||
char ksym_buf[KSYM_NAME_LEN] __maybe_unused;
|
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 */
|
/* cpu stop callbacks are not allowed to sleep */
|
||||||
preempt_disable();
|
preempt_disable();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue