]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
x86/tsc: Allow TSC calibration without PIT
authorPeter Zijlstra <peterz@infradead.org>
Fri, 22 Dec 2017 09:20:11 +0000 (10:20 +0100)
committerKhalid Elmously <khalid.elmously@canonical.com>
Wed, 6 Jun 2018 17:44:25 +0000 (13:44 -0400)
commitfaed5cdf7e146fd9b377b215ff814bd60f276114
treea0d6b36231a565b0bb054015b509bae807b4e31a
parent7d9d9410c7e3dc2b6e15eaec362317c2716969f2
x86/tsc: Allow TSC calibration without PIT

BugLink: http://bugs.launchpad.net/bugs/1774063
[ Upstream commit 30c7e5b123673d5e570e238dbada2fb68a87212c ]

Zhang Rui reported that a Surface Pro 4 will fail to boot with
lapic=notscdeadline. Part of the problem is that that machine doesn't have
a PIT.

If, for some reason, the TSC init has to fall back to TSC calibration, it
relies on the PIT to be present.

Allow TSC calibration to reliably fall back to HPET.

The below results in an accurate TSC measurement when forced on a IVB:

  tsc: Unable to calibrate against PIT
  tsc: No reference (HPET/PMTIMER) available
  tsc: Unable to calibrate against PIT
  tsc: using HPET reference calibration
  tsc: Detected 2792.451 MHz processor

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: len.brown@intel.com
Cc: rui.zhang@intel.com
Link: https://lkml.kernel.org/r/20171222092243.333145937@infradead.org
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
arch/x86/include/asm/i8259.h
arch/x86/kernel/tsc.c