From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753211AbcGSHOM (ORCPT ); Tue, 19 Jul 2016 03:14:12 -0400 Received: from terminus.zytor.com ([198.137.202.10]:45586 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753186AbcGSHOH (ORCPT ); Tue, 19 Jul 2016 03:14:07 -0400 Date: Tue, 19 Jul 2016 00:13:37 -0700 From: tip-bot for Anna-Maria Gleixner Message-ID: Cc: pbonzini@redhat.com, mingo@kernel.org, torvalds@linux-foundation.org, hpa@zytor.com, anna-maria@linutronix.de, peterz@infradead.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, rkrcmar@redhat.com Reply-To: pbonzini@redhat.com, torvalds@linux-foundation.org, mingo@kernel.org, anna-maria@linutronix.de, hpa@zytor.com, peterz@infradead.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, rkrcmar@redhat.com In-Reply-To: <20160713153335.452527104@linutronix.de> References: <20160713153335.452527104@linutronix.de> To: linux-tip-commits@vger.kernel.org Subject: [tip:smp/hotplug] KVM/x86: Remove superfluous SMP function call Git-Commit-ID: 162e52a117af5d9c5dfc62b7c2ee90b3e91a7b32 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: 162e52a117af5d9c5dfc62b7c2ee90b3e91a7b32 Gitweb: http://git.kernel.org/tip/162e52a117af5d9c5dfc62b7c2ee90b3e91a7b32 Author: Anna-Maria Gleixner AuthorDate: Wed, 13 Jul 2016 17:16:32 +0000 Committer: Ingo Molnar CommitDate: Fri, 15 Jul 2016 10:40:21 +0200 KVM/x86: Remove superfluous SMP function call Since the following commit: 1cf4f629d9d2 ("cpu/hotplug: Move online calls to hotplugged cpu") ... the CPU_ONLINE and CPU_DOWN_PREPARE notifiers are always run on the hot plugged CPU, and as of commit: 3b9d6da67e11 ("cpu/hotplug: Fix rollback during error-out in __cpu_disable()") the CPU_DOWN_FAILED notifier also runs on the hot plugged CPU. This patch converts the SMP functional calls into direct calls. smp_function_call_single() executes the function with interrupts disabled. This calling convention is not preserved because there is no reason to do so. Signed-off-by: Anna-Maria Gleixner Acked-by: Paolo Bonzini Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Radim Krcmar Cc: Thomas Gleixner Cc: kvm@vger.kernel.org Cc: rt@linutronix.de Link: http://lkml.kernel.org/r/20160713153335.452527104@linutronix.de Signed-off-by: Ingo Molnar --- arch/x86/kvm/x86.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 7da5dd2..6f90595 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -5662,15 +5662,13 @@ static struct notifier_block kvmclock_cpufreq_notifier_block = { static int kvmclock_cpu_notifier(struct notifier_block *nfb, unsigned long action, void *hcpu) { - unsigned int cpu = (unsigned long)hcpu; - switch (action) { case CPU_ONLINE: case CPU_DOWN_FAILED: - smp_call_function_single(cpu, tsc_khz_changed, NULL, 1); + tsc_khz_changed(NULL); break; case CPU_DOWN_PREPARE: - smp_call_function_single(cpu, tsc_bad, NULL, 1); + tsc_bad(NULL); break; } return NOTIFY_OK;