diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-07-17 19:35:29 +0200 |
---|---|---|
committer | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2016-02-13 00:34:58 +0100 |
commit | 2835d893e1074ef0011f1fbbb6d1812146304375 (patch) | |
tree | 3d37eefcfe4c1fc0b6ad6b7e96e14c03516f21dd | |
parent | 5315b94d421482a62ce58ca20be04e6fa58e4afe (diff) | |
download | rt-linux-2835d893e1074ef0011f1fbbb6d1812146304375.tar.gz |
hotplug: Use migrate disable on unplug
Migration needs to be disabled accross the unplug handling to make
sure that the unplug thread is off the unplugged cpu.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r-- | kernel/cpu.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/cpu.c b/kernel/cpu.c index 553a75518b3fb..d2ff039e5d74e 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -455,14 +455,13 @@ static int _cpu_down(unsigned int cpu, int tasks_frozen) cpumask_andnot(cpumask, cpu_online_mask, cpumask_of(cpu)); set_cpus_allowed_ptr(current, cpumask); free_cpumask_var(cpumask); - preempt_disable(); + migrate_disable(); mycpu = smp_processor_id(); if (mycpu == cpu) { printk(KERN_ERR "Yuck! Still on unplug CPU\n!"); - preempt_enable(); + migrate_enable(); return -EBUSY; } - preempt_enable(); cpu_hotplug_begin(); err = cpu_unplug_begin(cpu); @@ -543,6 +542,7 @@ static int _cpu_down(unsigned int cpu, int tasks_frozen) out_release: cpu_unplug_done(cpu); out_cancel: + migrate_enable(); cpu_hotplug_done(); if (!err) cpu_notify_nofail(CPU_POST_DEAD | mod, hcpu); |