Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2012099ybl; Thu, 29 Aug 2019 02:14:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqy2ugLjb67ZceNeTx/MEthwa/ea8U/+WmR9Hr9wvSkvIsWXAa25O+fSIwiWIdflhIuqVZW2 X-Received: by 2002:a65:4243:: with SMTP id d3mr7547688pgq.119.1567070049996; Thu, 29 Aug 2019 02:14:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567070049; cv=none; d=google.com; s=arc-20160816; b=IqgE/B2szHhru8cogqnDoCVvUB0cMPOD6KxiATsMIQl2kHL0zkqSbyjImA3o/H5gJd x/0AVLlcDtpFJf6T0XGtNEaPAdk23yy0T53aYUOMpGbLB0l/EOUs8WaJCYGCWYJqhwtB G4NIhU2mS4yIjn+AN7bYsRj2eUWzpt8rxtLYBs+ioTH7VEcCYshx4ib0vn0kfoHk0bfL 09rnu8UPAOS/G71DB6K+CBLdGuX5At8u9kQRzeR/luueP2idi8iq9ZxNuYmTZ+nge64f jlqaoUpGDyTMR5PrUmvNFwXdvH9VpsraMI0GEprwjQSmvSWDIFFWAf/G9XzolZxD8rX/ HDeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=ZKG2VD8m/SCv1j+sqYWVW9c0awy/zDu2YM+O3egl510=; b=ylfKnL2+QOFIE7eQq4MXa1LploXUHgR0E5WhbmSEZX0/nz2nENYJDc4t67h2A7GKJN mg9lKg73hFKbu+/dGDLPf6EU1OwyKVAowMsJMGuoaiPVPPT3Hd7svk1ffwBhWhcgrdwL ig0sFr+aeORPmMAtu/4komKhUCNQwSq6chBdJ6cMiFWwpSUw0vBta0mc8J/giXXAf1ks HOEAl0c1/4k4E2VpTHBprfNjM1HTLuZrG37ZoI7jlBsXZg4EbpFx0TixXTA3l7uutrkF t7uqTfuGH3JwyF4BVjhUkQIeB3ZCOKvdp18pO2MS7XOkhoyqqw2TiACFvWuBmMGG11lL tHUA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 21si1414726pgk.492.2019.08.29.02.13.53; Thu, 29 Aug 2019 02:14:09 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727026AbfH2JMu (ORCPT + 99 others); Thu, 29 Aug 2019 05:12:50 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:40096 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725782AbfH2JMu (ORCPT ); Thu, 29 Aug 2019 05:12:50 -0400 Received: from 61-220-137-37.hinet-ip.hinet.net ([61.220.137.37] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1i3GTr-0004pV-N2; Thu, 29 Aug 2019 09:12:36 +0000 From: Kai-Heng Feng To: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de Cc: hpa@zytor.com, harry.pan@intel.com, x86@kernel.org, linux-kernel@vger.kernel.org, Kai-Heng Feng Subject: [PATCH] x86/hpet: Disable HPET on Intel Coffe Lake Date: Thu, 29 Aug 2019 17:12:32 +0800 Message-Id: <20190829091232.15065-1-kai.heng.feng@canonical.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Some Coffee Lake platforms have skewed HPET timer once the SoCs entered PC10, and marked TSC as unstable clocksource as result. Harry Pan identified it's a firmware bug [1]. To prevent creating a circular dependency between HPET and TSC, let's disable HPET on affected platforms. [1]: https://lore.kernel.org/lkml/20190516090651.1396-1-harry.pan@intel.com/ Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=203183 Signed-off-by: Kai-Heng Feng --- arch/x86/kernel/hpet.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c index c6f791bc481e..07e9ec6f85b6 100644 --- a/arch/x86/kernel/hpet.c +++ b/arch/x86/kernel/hpet.c @@ -7,7 +7,9 @@ #include #include +#include #include +#include #include #undef pr_fmt @@ -806,6 +808,12 @@ static bool __init hpet_counting(void) return false; } +static const struct x86_cpu_id hpet_blacklist[] __initconst = { + { X86_VENDOR_INTEL, 6, INTEL_FAM6_KABYLAKE_MOBILE }, + { X86_VENDOR_INTEL, 6, INTEL_FAM6_KABYLAKE_DESKTOP }, + { } +}; + /** * hpet_enable - Try to setup the HPET timer. Returns 1 on success. */ @@ -819,6 +827,9 @@ int __init hpet_enable(void) if (!is_hpet_capable()) return 0; + if (!hpet_force_user && x86_match_cpu(hpet_blacklist)) + return 0; + hpet_set_mapping(); if (!hpet_virt_address) return 0; -- 2.17.1