]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
stop_machine: Provide stop_machine_cpuslocked()
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Wed, 24 May 2017 08:15:16 +0000 (10:15 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 26 May 2017 08:10:36 +0000 (10:10 +0200)
commitfe5595c074005bd94f0c7d1644175941149f6768
treedbdc36f344ab77ec7d2624687ae46fc787059b46
parent9805c6733349ea3ccd22cf75b8ebaabb5290e310
stop_machine: Provide stop_machine_cpuslocked()

Some call sites of stop_machine() are within a get_online_cpus() protected
region.

stop_machine() calls get_online_cpus() as well, which is possible in the
current implementation but prevents converting the hotplug locking to a
percpu rwsem.

Provide stop_machine_cpuslocked() to avoid nested calls to get_online_cpus().

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/20170524081547.400700852@linutronix.de
include/linux/stop_machine.h
kernel/stop_machine.c