View | Details | Raw Unified | Return to bug 260868
Collapse All | Expand All

(-)b/sys/x86/x86/tsc.c (+3 lines)
Lines 711-716 tsc_calibrate(void) Link Here
711
		return;
711
		return;
712
712
713
	tc = atomic_load_ptr(&timecounter);
713
	tc = atomic_load_ptr(&timecounter);
714
	if (tc->tc_quality <= 0)
715
		goto calibrated;
714
716
715
	flags = intr_disable();
717
	flags = intr_disable();
716
	cpu = curcpu;
718
	cpu = curcpu;
Lines 739-744 tsc_calibrate(void) Link Here
739
	freq_khz = tc->tc_frequency * (tsc_end - tsc_start) / (t_end - t_start);
741
	freq_khz = tc->tc_frequency * (tsc_end - tsc_start) / (t_end - t_start);
740
742
741
	tsc_update_freq(freq_khz);
743
	tsc_update_freq(freq_khz);
744
calibrated:
742
	tc_init(&tsc_timecounter);
745
	tc_init(&tsc_timecounter);
743
	set_cputicker(rdtsc, tsc_freq, !tsc_is_invariant);
746
	set_cputicker(rdtsc, tsc_freq, !tsc_is_invariant);
744
}
747
}

Return to bug 260868