lkml.org 
[lkml]   [2008]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch 28/50] x86: disable TSC for sched_clock() when calibration failed
    -stable review patch.  If anyone has any objections, please let us know.
    ---------------------

    From: Thomas Gleixner <tglx@linutronix.de>

    upstream commit: 74dc51a3de06aa516e3b9fdc4017b2aeb38bf44b

    When the TSC calibration fails then TSC is still used in
    sched_clock(). Disable it completely in that case.

    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Cc: stable@kernel.org
    Signed-off-by: Chris Wright <chrisw@sous-sol.org>
    ---
    arch/x86/kernel/tsc_32.c | 5 +++++
    1 file changed, 5 insertions(+)

    --- a/arch/x86/kernel/tsc_32.c
    +++ b/arch/x86/kernel/tsc_32.c
    @@ -401,6 +401,11 @@ void __init tsc_init(void)

    if (!cpu_khz) {
    mark_tsc_unstable("could not calculate TSC khz");
    + /*
    + * We need to disable the TSC completely in this case
    + * to prevent sched_clock() from using it.
    + */
    + tsc_disabled = 1;
    return;
    }

    --


    \
     
     \ /
      Last update: 2008-06-07 03:13    [W:0.019 / U:32.692 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site