Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F148056316
D33695.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
796 B
Referenced Files
None
Subscribers
None
D33695.diff
View Options
diff --git a/sys/x86/x86/tsc.c b/sys/x86/x86/tsc.c
--- a/sys/x86/x86/tsc.c
+++ b/sys/x86/x86/tsc.c
@@ -59,6 +59,7 @@
uint64_t tsc_freq;
int tsc_is_invariant;
int tsc_perf_stat;
+static int tsc_early_calib_exact;
static eventhandler_tag tsc_levels_tag, tsc_pre_tag, tsc_post_tag;
@@ -133,6 +134,7 @@
tsc_freq = regs[0] | ((uint64_t)regs[1] << 32);
}
tsc_is_invariant = 1;
+ tsc_early_calib_exact = 1;
}
/*
@@ -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
Mon, Mar 16, 11:30 AM (8 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29768739
Default Alt Text
D33695.diff (796 B)
Attached To
Mode
D33695: Skip TSC calibration if exact value known
Attached
Detach File
Event Timeline
Log In to Comment