aboutsummaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <[email protected]>2017-05-24 10:15:28 +0200
committerThomas Gleixner <[email protected]>2017-05-26 10:10:42 +0200
commit210e21331fc3a396af640cec652be769d146e49f (patch)
tree6a93eece8fdbd2c9bf77aeeab2a42e84cb7899ec /kernel
parentf9a69931c3959940538884d5962b770c3db75df5 (diff)
cpu/hotplug: Use stop_machine_cpuslocked() in takedown_cpu()
takedown_cpu() is a cpu hotplug function invoking stop_machine(). The cpu hotplug machinery holds the hotplug lock for write. stop_machine() invokes get_online_cpus() as well. This is correct, but prevents the conversion of the hotplug locking to a percpu rwsem. Use stop_machine_cpuslocked() to avoid the nested call. Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Tested-by: Paul E. McKenney <[email protected]> Acked-by: Ingo Molnar <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Steven Rostedt <[email protected]> Link: http://lkml.kernel.org/r/[email protected]
Diffstat (limited to 'kernel')
-rw-r--r--kernel/cpu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/cpu.c b/kernel/cpu.c
index e4389ac55b65..142d889d9f69 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -701,7 +701,7 @@ static int takedown_cpu(unsigned int cpu)
/*
* So now all preempt/rcu users must observe !cpu_active().
*/
- err = stop_machine(take_cpu_down, NULL, cpumask_of(cpu));
+ err = stop_machine_cpuslocked(take_cpu_down, NULL, cpumask_of(cpu));
if (err) {
/* CPU refused to die */
irq_unlock_sparse();