From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1422821AbdEZIjU (ORCPT ); Fri, 26 May 2017 04:39:20 -0400 Received: from terminus.zytor.com ([65.50.211.136]:51765 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S943574AbdEZIiK (ORCPT ); Fri, 26 May 2017 04:38:10 -0400 Date: Fri, 26 May 2017 01:35:36 -0700 From: tip-bot for Sebastian Andrzej Siewior Message-ID: Cc: rostedt@goodmis.org, bigeasy@linutronix.de, hpa@zytor.com, linux-kernel@vger.kernel.org, mingo@kernel.org, tglx@linutronix.de, paulmck@linux.vnet.ibm.com, peterz@infradead.org Reply-To: tglx@linutronix.de, peterz@infradead.org, paulmck@linux.vnet.ibm.com, rostedt@goodmis.org, bigeasy@linutronix.de, hpa@zytor.com, linux-kernel@vger.kernel.org, mingo@kernel.org In-Reply-To: <20170524081547.651378834@linutronix.de> References: <20170524081547.651378834@linutronix.de> To: linux-tip-commits@vger.kernel.org Subject: [tip:smp/hotplug] x86/mtrr: Remove get_online_cpus() from mtrr_save_state() Git-Commit-ID: 547efeadd42a3c75e41e33c0637cba100fc18289 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: 547efeadd42a3c75e41e33c0637cba100fc18289 Gitweb: http://git.kernel.org/tip/547efeadd42a3c75e41e33c0637cba100fc18289 Author: Sebastian Andrzej Siewior AuthorDate: Wed, 24 May 2017 10:15:19 +0200 Committer: Thomas Gleixner CommitDate: Fri, 26 May 2017 10:10:38 +0200 x86/mtrr: Remove get_online_cpus() from mtrr_save_state() mtrr_save_state() is invoked from native_cpu_up() which is in the context of a CPU hotplug operation and therefor calling get_online_cpus() is pointless. While this works in the current get_online_cpus() implementation it prevents from converting the hotplug locking to percpu rwsems. Remove it. 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/20170524081547.651378834@linutronix.de --- arch/x86/kernel/cpu/mtrr/main.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/x86/kernel/cpu/mtrr/main.c b/arch/x86/kernel/cpu/mtrr/main.c index 2bce84d..c5bb63b 100644 --- a/arch/x86/kernel/cpu/mtrr/main.c +++ b/arch/x86/kernel/cpu/mtrr/main.c @@ -807,10 +807,8 @@ void mtrr_save_state(void) if (!mtrr_enabled()) return; - get_online_cpus(); first_cpu = cpumask_first(cpu_online_mask); smp_call_function_single(first_cpu, mtrr_save_fixed_ranges, NULL, 1); - put_online_cpus(); } void set_mtrr_aps_delayed_init(void)