From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967464AbdEZIoI (ORCPT ); Fri, 26 May 2017 04:44:08 -0400 Received: from terminus.zytor.com ([65.50.211.136]:43915 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967235AbdEZIoE (ORCPT ); Fri, 26 May 2017 04:44:04 -0400 Date: Fri, 26 May 2017 01:40:35 -0700 From: tip-bot for Sebastian Andrzej Siewior Message-ID: Cc: tglx@linutronix.de, mingo@kernel.org, linux-kernel@vger.kernel.org, hpa@zytor.com, rostedt@goodmis.org, bigeasy@linutronix.de, paulmck@linux.vnet.ibm.com, peterz@infradead.org Reply-To: mingo@kernel.org, tglx@linutronix.de, hpa@zytor.com, linux-kernel@vger.kernel.org, paulmck@linux.vnet.ibm.com, peterz@infradead.org, bigeasy@linutronix.de, rostedt@goodmis.org In-Reply-To: <20170524081548.423292433@linutronix.de> References: <20170524081548.423292433@linutronix.de> To: linux-tip-commits@vger.kernel.org Subject: [tip:smp/hotplug] cpu/hotplug: Use stop_machine_cpuslocked() in takedown_cpu() Git-Commit-ID: 210e21331fc3a396af640cec652be769d146e49f X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 210e21331fc3a396af640cec652be769d146e49f Gitweb: http://git.kernel.org/tip/210e21331fc3a396af640cec652be769d146e49f Author: Sebastian Andrzej Siewior AuthorDate: Wed, 24 May 2017 10:15:28 +0200 Committer: Thomas Gleixner CommitDate: Fri, 26 May 2017 10:10:42 +0200 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 Signed-off-by: Thomas Gleixner Tested-by: Paul E. McKenney Acked-by: Ingo Molnar Cc: Peter Zijlstra Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170524081548.423292433@linutronix.de --- kernel/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/cpu.c b/kernel/cpu.c index e4389ac..142d889 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();