|
@@ -1161,6 +1161,7 @@ static void tsc_refine_calibration_work(struct work_struct *work)
|
|
static int hpet;
|
|
static int hpet;
|
|
u64 tsc_stop, ref_stop, delta;
|
|
u64 tsc_stop, ref_stop, delta;
|
|
unsigned long freq;
|
|
unsigned long freq;
|
|
|
|
+ int cpu;
|
|
|
|
|
|
/* Don't bother refining TSC on unstable systems */
|
|
/* Don't bother refining TSC on unstable systems */
|
|
if (check_tsc_unstable())
|
|
if (check_tsc_unstable())
|
|
@@ -1211,6 +1212,10 @@ static void tsc_refine_calibration_work(struct work_struct *work)
|
|
/* Inform the TSC deadline clockevent devices about the recalibration */
|
|
/* Inform the TSC deadline clockevent devices about the recalibration */
|
|
lapic_update_tsc_freq();
|
|
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:
|
|
out:
|
|
if (boot_cpu_has(X86_FEATURE_ART))
|
|
if (boot_cpu_has(X86_FEATURE_ART))
|
|
art_related_clocksource = &clocksource_tsc;
|
|
art_related_clocksource = &clocksource_tsc;
|