Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F109481798
D33695.id100743.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
817 B
Referenced Files
None
Subscribers
None
D33695.id100743.diff
View Options
Index: sys/x86/x86/tsc.c
===================================================================
--- sys/x86/x86/tsc.c
+++ sys/x86/x86/tsc.c
@@ -59,6 +59,7 @@
uint64_t tsc_freq;
int tsc_is_invariant;
int tsc_perf_stat;
+int tsc_early_calib_exact;
static eventhandler_tag tsc_levels_tag, tsc_pre_tag, tsc_post_tag;
@@ -267,6 +268,7 @@
if (vm_guest == VM_GUEST_VMWARE) {
tsc_freq_vmware();
+ tsc_early_calib_exact = 1;
return;
}
@@ -709,6 +711,8 @@
if (tsc_disabled)
return;
+ if (tsc_early_calib_exact)
+ goto calibrated;
tc = atomic_load_ptr(&timecounter);
@@ -739,6 +743,7 @@
freq_khz = tc->tc_frequency * (tsc_end - tsc_start) / (t_end - t_start);
tsc_update_freq(freq_khz);
+calibrated:
tc_init(&tsc_timecounter);
set_cputicker(rdtsc, tsc_freq, !tsc_is_invariant);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Feb 6, 4:11 PM (6 h, 14 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16495731
Default Alt Text
D33695.id100743.diff (817 B)
Attached To
Mode
D33695: Skip TSC calibration if exact value known
Attached
Detach File
Event Timeline
Log In to Comment