For the (older) CPUs that still need the refined TSC calibration, also
update the sched_clock() rate.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
        static int hpet;
        u64 tsc_stop, ref_stop, delta;
        unsigned long freq;
+       int cpu;
 
        /* Don't bother refining TSC on unstable systems */
        if (check_tsc_unstable())
        /* Inform the TSC deadline clockevent devices about the recalibration */
        lapic_update_tsc_freq();
 
+       /* Update the sched_clock() rate to match the clocksource one */
+       for_each_possible_cpu(cpu)
+               __set_cyc2ns_scale(tsc_khz, cpu, tsc_stop);
+
 out:
        if (boot_cpu_has(X86_FEATURE_ART))
                art_related_clocksource = &clocksource_tsc;