Received: by 10.223.176.46 with SMTP id f43csp2648157wra; Mon, 22 Jan 2018 00:51:02 -0800 (PST) X-Google-Smtp-Source: AH8x225I9zptpUiSFJ1q+4pp9DJcpPfhSsd1DOAMvYACNsJwkcIA21Ri1ns4XF4K0A9D1z2UT5Rp X-Received: by 10.99.116.88 with SMTP id e24mr6538990pgn.279.1516611062864; Mon, 22 Jan 2018 00:51:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516611062; cv=none; d=google.com; s=arc-20160816; b=yeYINU4eKSg1xQKRtZdA1VPwmZRehOwh0KvQ7NFAWpZSnGb6aKIHfEuThgWBsHG9FR H2CnGY11iMVt0745cDRS31Gegt68mrFTCzGEDhtwn4w6YLQ86opRTz+O4oMDaSAH8FgI RNmUSQZteG47PY9ITf9QuyIgKxqTbRK0+/Z7LH1n5qQ7hhcdVgYDtvF82BDw/rrvZGLE gOINt9S1qEu3UMfmurdKIFprwyCE3sK/KXeJk0ZG7dec9caEWD/fR6wrL6rJX6KPs7xw 887tCINr4vNDKKnRUgakMr2rM1BtGxUqQ5dP7Huoi6FGsWpR6Kg6Yafm61oGlix0+86z d3ZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=EY2UgIl/9WoLJ0kJI7VO72wUgeM/qs9Nlw1RuMtczxE=; b=EuU1lms19uBc5ql3zlrzS8+pRkiS2MR8eySAqAFNoIKsVdOMFmnp0oCMQUAI1lQu0+ KwBx/z7pe5XTdbAb4j0haluRkXQ7lVW3f5lQS+wOTZRHSY+WcNkh7V1d1Zp2eqqrUD1F lslsvPQyiUC1huXe1FdnQ+73lBvICYyaos/Y03+WEhthYuIQTPa/T5BX/o40V/fNKBol qy3Dyp7yJBaa/FQaI9NnCfncHwEg5SAYg2Kb4978BUlClZOAD/u/z8M+9hRBBUNlQo3f 8bshLcTmtOsbi/jMPqjbO+1l5mh1hEEDD7xM7pBlNFX2f6oQliEPJYnb4Jw3BPdvHDb1 sDGA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o6-v6si3196855plh.705.2018.01.22.00.50.48; Mon, 22 Jan 2018 00:51:02 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752600AbeAVIuV (ORCPT + 99 others); Mon, 22 Jan 2018 03:50:21 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:32814 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752589AbeAVIuT (ORCPT ); Mon, 22 Jan 2018 03:50:19 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 6188DCB2; Mon, 22 Jan 2018 08:50:18 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Len Brown , Thomas Gleixner , peterz@infradead.org, Prarit Bhargava Subject: [PATCH 4.9 20/47] x86/tsc: Fix erroneous TSC rate on Skylake Xeon Date: Mon, 22 Jan 2018 09:45:31 +0100 Message-Id: <20180122083927.255964624@linuxfoundation.org> X-Mailer: git-send-email 2.16.0 In-Reply-To: <20180122083925.568134913@linuxfoundation.org> References: <20180122083925.568134913@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Len Brown commit b511203093489eb1829cb4de86e8214752205ac6 upstream. The INTEL_FAM6_SKYLAKE_X hardcoded crystal_khz value of 25MHZ is problematic: - SKX workstations (with same model # as server variants) use a 24 MHz crystal. This results in a -4.0% time drift rate on SKX workstations. - SKX servers subject the crystal to an EMI reduction circuit that reduces its actual frequency by (approximately) -0.25%. This results in -1 second per 10 minute time drift as compared to network time. This issue can also trigger a timer and power problem, on configurations that use the LAPIC timer (versus the TSC deadline timer). Clock ticks scheduled with the LAPIC timer arrive a few usec before the time they are expected (according to the slow TSC). This causes Linux to poll-idle, when it should be in an idle power saving state. The idle and clock code do not graciously recover from this error, sometimes resulting in significant polling and measurable power impact. Stop using native_calibrate_tsc() for INTEL_FAM6_SKYLAKE_X. native_calibrate_tsc() will return 0, boot will run with tsc_khz = cpu_khz, and the TSC refined calibration will update tsc_khz to correct for the difference. [ tglx: Sanitized change log ] Fixes: 6baf3d61821f ("x86/tsc: Add additional Intel CPU models to the crystal quirk list") Signed-off-by: Len Brown Signed-off-by: Thomas Gleixner Cc: peterz@infradead.org Cc: Prarit Bhargava Link: https://lkml.kernel.org/r/ff6dcea166e8ff8f2f6a03c17beab2cb436aa779.1513920414.git.len.brown@intel.com Signed-off-by: Greg Kroah-Hartman --- arch/x86/kernel/tsc.c | 1 - 1 file changed, 1 deletion(-) --- a/arch/x86/kernel/tsc.c +++ b/arch/x86/kernel/tsc.c @@ -693,7 +693,6 @@ unsigned long native_calibrate_tsc(void) case INTEL_FAM6_KABYLAKE_DESKTOP: crystal_khz = 24000; /* 24.0 MHz */ break; - case INTEL_FAM6_SKYLAKE_X: case INTEL_FAM6_ATOM_DENVERTON: crystal_khz = 25000; /* 25.0 MHz */ break;