Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • L linux-dm
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • linux-arm
  • linux-dm
  • Repository
Switch branch/tag
  • linux-dm
  • arch
  • x86
  • kernel
  • apic
  • apic.c
Find file BlameHistoryPermalink
  • Thomas Gleixner's avatar
    x86/apic: Handle missing global clockevent gracefully · f897e60a
    Thomas Gleixner authored Aug 09, 2019
    
    
    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: default avatarDaniel Drake <drake@endlessm.com>
    Reported-by: default avatarJiri Slaby <jslaby@suse.cz>
    Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
    Tested-by: default avatarDaniel 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
    f897e60a