[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190829091232.15065-1-kai.heng.feng@canonical.com>
Date: Thu, 29 Aug 2019 17:12:32 +0800
From: Kai-Heng Feng <kai.heng.feng@...onical.com>
To: tglx@...utronix.de, mingo@...hat.com, bp@...en8.de
Cc: hpa@...or.com, harry.pan@...el.com, x86@...nel.org,
linux-kernel@...r.kernel.org,
Kai-Heng Feng <kai.heng.feng@...onical.com>
Subject: [PATCH] x86/hpet: Disable HPET on Intel Coffe Lake
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 <kai.heng.feng@...onical.com>
---
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 <linux/cpu.h>
#include <linux/irq.h>
+#include <asm/cpu_device_id.h>
#include <asm/hpet.h>
+#include <asm/intel-family.h>
#include <asm/time.h>
#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
Powered by blists - more mailing lists