Received: by 10.223.176.46 with SMTP id f43csp2649690wra; Mon, 22 Jan 2018 00:53:12 -0800 (PST) X-Google-Smtp-Source: AH8x227MbpHSB2n1bGU1Ke7cHHoG+OTu9yNHLYodXxATI0ZDHPhvYnboOFCaYkhc9P4kpZEOjV7i X-Received: by 10.98.31.131 with SMTP id l3mr7929833pfj.116.1516611192027; Mon, 22 Jan 2018 00:53:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516611191; cv=none; d=google.com; s=arc-20160816; b=jyoE6BWy7ncs90pSNmof8i0or8kuqRJfLq4eiFAi+n5PgtJ+QpLe1xbQTmbWEsj3yG OQx+LQDE0SZfS7qcKvBcnJRQtHYeMvqomrrHk5hQ0rfVffAs7tr29i68CuHkys8j95kC mmuygvlst7ZCFv0WJGlT4BeItaGCtfQOcY1PD5I20pA8GhzAjAhkyhSIEfCAHdK95/fE 5bAnrLyTr0e2lSJLG1o4lzMMmSh8EDUUH8qYVBGGwiiJmSCcosUd81955DK9YFD2tNmu D8ULiRT3kcS7XmCYN3qpm3fAZUBQnUv2JwYLC9LzpfAiFCpEYN6ffzpdbmS20V+JFtr8 E6tQ== 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=0bhHWcjch1xF4fvirqbyRbkK1JLgHuNIFHCDUybykuc=; b=RnSvcClnpZW+5aswyWfYht6dzDO/DM2mBuunPk4PLEuh8uC6WYPJnRZS9da/1JDX14 XCWQjjqHXDEcKLVPRmzyHdl+ImtY3KWSN18pAgm9FcM55MMZtu3auvXEAR0sOH7wzZwU R667PtN/WnIvkIAd55E34FfwD1DIVNqpNrZmn1HCtzBZzvX0JVFpcjfcFecrY3EKK6ck ug7F3sVsjV450oNNGr6HqmgQW1fkciDjxGMV/PXB54jO/ErhTVwZ5HKMopZhdb6x105b bkM/cgfve9aIJo8AU7lHDTMn71kK1311eTxDaZdoJIVmshAg2ci7hUX6E6cx2it28lmW fQ7A== 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 w123si15069377pfd.95.2018.01.22.00.52.57; Mon, 22 Jan 2018 00:53:11 -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 S1753116AbeAVIwC (ORCPT + 99 others); Mon, 22 Jan 2018 03:52:02 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:33484 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753087AbeAVIv7 (ORCPT ); Mon, 22 Jan 2018 03:51:59 -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 B1658491; Mon, 22 Jan 2018 08:51:58 +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.14 41/89] x86/tsc: Fix erroneous TSC rate on Skylake Xeon Date: Mon, 22 Jan 2018 09:45:21 +0100 Message-Id: <20180122083958.798379550@linuxfoundation.org> X-Mailer: git-send-email 2.16.0 In-Reply-To: <20180122083954.683903493@linuxfoundation.org> References: <20180122083954.683903493@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.14-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 @@ -602,7 +602,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;