summaryrefslogtreecommitdiffstats
path: root/arch/x86/include
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2019-08-09 14:54:07 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-08-29 08:30:23 +0200
commit50d3cd159713ef1e5d4d75918bcaac47170388e6 (patch)
tree33fbe6c9676fcde684bd16804e00aa8bac78a222 /arch/x86/include
parent60d4af6a0e5f1c608b5c606f4098d040fa6d0012 (diff)
downloadlinux-stable-50d3cd159713ef1e5d4d75918bcaac47170388e6.tar.gz
linux-stable-50d3cd159713ef1e5d4d75918bcaac47170388e6.tar.bz2
linux-stable-50d3cd159713ef1e5d4d75918bcaac47170388e6.zip
x86/apic: Handle missing global clockevent gracefully
commit f897e60a12f0b9146357780d317879bce2a877dc upstream. Some newer machines do not advertise legacy timers. The kernel can handle that situation if the TSC and the CPU frequency are enumerated by CPUID or MSRs and the CPU supports TSC deadline timer. If the CPU does not support TSC deadline timer the local APIC timer frequency has to be known as well. Some Ryzens machines do not advertize legacy timers, but there is no reliable way to determine the bus frequency which feeds the local APIC timer when the machine allows overclocking of that frequency. As there is no legacy timer the local APIC timer calibration crashes due to a NULL pointer dereference when accessing the not installed global clock event device. Switch the calibration loop to a non interrupt based one, which polls either TSC (if frequency is known) or jiffies. The latter requires a global clockevent. As the machines which do not have a global clockevent installed have a known TSC frequency this is a non issue. For older machines where TSC frequency is not known, there is no known case where the legacy timers do not exist as that would have been reported long ago. Reported-by: Daniel Drake <drake@endlessm.com> Reported-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: Daniel Drake <drake@endlessm.com> Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/alpine.DEB.2.21.1908091443030.21433@nanos.tec.linutronix.de Link: http://bugzilla.opensuse.org/show_bug.cgi?id=1142926#c12 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/x86/include')
0 files changed, 0 insertions, 0 deletions