• Rusty Russell's avatar
    x86: if we cannot calibrate the TSC, we panic. · 3c2047cd
    Rusty Russell authored
    The current tsc_init() clears the TSC feature bit if the TSC khz
    cannot be calculated, causing us to panic in
    arch/x86/kernel/cpu/bugs.c check_config().  We should simply mark it
    unstable.
    
    Frankly, someone should take an axe to this code.  mark_tsc_unstable()
    not only marks it unstable, but sets tsc_enabled to 0, which seems
    redundant but is actually important here because means it won't be
    used by sched_clock() either.  Perhaps a tristate enum "UNUSABLE,
    UNSTABLE, OK" would be clearer, and separate mark_tsc_unstable() and
    mark_tsc_broken() functions?
    Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    3c2047cd
tsc_32.c 9.83 KB