Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933198AbcJaBRi (ORCPT ); Sun, 30 Oct 2016 21:17:38 -0400 Received: from terminus.zytor.com ([198.137.202.10]:46182 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932900AbcJaBRf (ORCPT ); Sun, 30 Oct 2016 21:17:35 -0400 Date: Sun, 30 Oct 2016 18:17:21 -0700 From: tip-bot for Alexey Makhalov Message-ID: Cc: hpa@zytor.com, tglx@linutronix.de, linux-kernel@vger.kernel.org, akataria@vmware.com, amakhalov@vmware.com, mingo@kernel.org Reply-To: akataria@vmware.com, mingo@kernel.org, amakhalov@vmware.com, linux-kernel@vger.kernel.org, tglx@linutronix.de, hpa@zytor.com In-Reply-To: <20161028075432.90579-2-amakhalov@vmware.com> References: <20161028075432.90579-2-amakhalov@vmware.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/platform] x86/vmware: Use tsc_khz value for calibrate_cpu() Git-Commit-ID: 687bca8d664ac9b098005b57846773eb62040ae0 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 Content-Length: 1720 Lines: 44 Commit-ID: 687bca8d664ac9b098005b57846773eb62040ae0 Gitweb: http://git.kernel.org/tip/687bca8d664ac9b098005b57846773eb62040ae0 Author: Alexey Makhalov AuthorDate: Fri, 28 Oct 2016 00:54:30 -0700 Committer: Thomas Gleixner CommitDate: Sun, 30 Oct 2016 08:57:07 +0100 x86/vmware: Use tsc_khz value for calibrate_cpu() Commit aa297292d708 ("x86/tsc: Enumerate SKL cpu_khz and tsc_khz via CPUID") separated the calibration mechanisms for cpu_khz and tsc_khz. Since the vmware hypervisor provides a constant frequency TSC to the guest, this change can lead to divergence between the tsc and the cpu frequency after vmotion, which might confuse the user. Solve this by overriding the x86 platform cpu calibration callback with the vmware specific tsc calibration function. Signed-off-by: Alexey Makhalov Acked-by: Alok N Kataria Cc: linux-doc@vger.kernel.org Cc: pv-drivers@vmware.com Cc: corbet@lwn.net Cc: virtualization@lists.linux-foundation.org Link: http://lkml.kernel.org/r/20161028075432.90579-2-amakhalov@vmware.com Signed-off-by: Thomas Gleixner --- arch/x86/kernel/cpu/vmware.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/kernel/cpu/vmware.c b/arch/x86/kernel/cpu/vmware.c index 4e34da4b..480790f 100644 --- a/arch/x86/kernel/cpu/vmware.c +++ b/arch/x86/kernel/cpu/vmware.c @@ -83,6 +83,7 @@ static void __init vmware_platform_setup(void) vmware_tsc_khz = tsc_khz; x86_platform.calibrate_tsc = vmware_get_tsc_khz; + x86_platform.calibrate_cpu = vmware_get_tsc_khz; #ifdef CONFIG_X86_LOCAL_APIC /* Skip lapic calibration since we know the bus frequency. */