From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Google-Smtp-Source: AH8x226ZSNw2le/BNQnWmYegzGEFMwgaz1SKmqnpgdYqiAc6FSrWjL7fazKZNRinGimpqkxNZZXF ARC-Seal: i=1; a=rsa-sha256; t=1516611120; cv=none; d=google.com; s=arc-20160816; b=u593GIGzKTnFudA9eovZzdcsmMCctSP9eyDMq8bMk8HMiohQliOBn7xotBDBGqVtHX nKsoN5KqBSZhOcMRkh54RAbQWBWgED8FYGVL9Y4BzGICOUtOe9NsfZt2jgcZMbaDBqZu q19v4GbzJB6nmUuEtCr6ASz3YQDmExETpAs0c+5Stw1qQ2zmx50Z+Bj8+OV/H2eb92l9 meMwipuJspptL7smD4ZxIYjY6jDGFO3wjp3AGVZifvUmStuK/zY7GyJF2yS7BIvUWbTJ 6CoMeYwrFsAZbATnofr8GEJfGIFcd6Pe72IU4sR1iHlHsJB5YnSpy8JRkLgm1yZu0xzj 1f2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:user-agent:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=0bhHWcjch1xF4fvirqbyRbkK1JLgHuNIFHCDUybykuc=; b=nvcEW6ACFDifd6TCAqMESqcVAjtZgHwQ3DUJnSdJB97Q1YXjiTTOSDuz57RB0IlaOD mwTtEW+YQnltaAIScazXlH9PWjGXNfiKWteZlLo9MhYce0Q8TU/jAQPF3711SRl6Hr8y PiZRodHKM2zebWQx5WslemGUZzXIxLF56FmWk+99ppDVDYXUTr6o+Sw1wRwVQ9bfWejw lLbh3SyyqEpu/efPUMJckUAe8xYVWHDlWqDEPL+rX1P7z62yiAlOn0hy2PCOQeC7rm0k TQ0Ok/ByNufcqQWTSvgEhnEnW87qc4OIm2hcDzNn+ZKoU5M7uivmcupf72PxguKaRcwi lMww== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning gregkh@linuxfoundation.org does not designate 90.92.71.90 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning gregkh@linuxfoundation.org does not designate 90.92.71.90 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-LABELS: =?utf-8?b?IlxcU2VudCI=?= X-GMAIL-THRID: =?utf-8?q?1590281916972679458?= X-GMAIL-MSGID: =?utf-8?q?1590282022316227310?= X-Mailing-List: linux-kernel@vger.kernel.org List-ID: 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;