Lines Matching full:tsc

3  * check TSC synchronization.
7 * We check whether all boot CPUs have their TSC's synchronized,
8 * print a warning if not and turn off the TSC clock-source.
23 #include <asm/tsc.h>
35 * TSC's on different sockets may be reset asynchronously.
36 * This may cause the TSC ADJUST value on socket 0 to be NOT 0.
45 pr_info("tsc: Marking TSC async resets true due to %s\n", reason); in mark_tsc_async_resets()
56 /* Skip unnecessary error messages if TSC already unstable */ in tsc_verify_tsc_adjust()
74 pr_warn(FW_BUG "TSC ADJUST differs: CPU%u %lld --> %lld. Restoring\n", in tsc_verify_tsc_adjust()
92 * the TSC is in sync with the already running cpus. in tsc_sanitize_first_cpu()
97 * and socket 0 may not have an TSC ADJUST value of 0. in tsc_sanitize_first_cpu()
101 pr_warn(FW_BUG "TSC ADJUST: CPU%u: %lld force to 0\n", in tsc_sanitize_first_cpu()
106 pr_info("TSC ADJUST: CPU%u: %lld NOT forced to 0\n", in tsc_sanitize_first_cpu()
122 /* Skip unnecessary error messages if TSC already unstable */ in tsc_store_and_check_tsc_adjust()
136 * Store and check the TSC ADJUST MSR if available
154 * If a non-zero TSC value for socket 0 may be valid then the default in tsc_store_and_check_tsc_adjust()
182 printk_once(FW_BUG "TSC ADJUST differs within socket(s), fixing all errors\n"); in tsc_store_and_check_tsc_adjust()
213 * of a critical section, to be able to prove TSC time-warps:
223 * TSC-warp measurement loop running on both CPUs. This is not called
224 * if there is no TSC.
239 * We take the global lock, measure TSC, save the in check_tsc_warp()
240 * previous TSC that was measured (possibly on in check_tsc_warp()
241 * another CPU) and update the previous TSC timestamp. in check_tsc_warp()
253 * TSC readout is totally broken]): in check_tsc_warp()
263 * we saw a time-warp of the TSC going backwards: in check_tsc_warp()
281 "Warning: zero tsc calibration delta: %Ld [max: %Ld]\n", in check_tsc_warp()
288 * online, a timeout of 20msec will be used for the TSC-warp measurement
293 * Ideally we should be able to skip the TSC sync check on the other
295 * But as the TSC is per-logical CPU and can potentially be modified wrongly
296 * by the bios, TSC sync test for smaller duration should be able
314 * No need to check if we already know that the TSC is not in check_tsc_sync_source()
315 * synchronized or if we have no TSC. in check_tsc_sync_source()
359 pr_debug("TSC synchronization [CPU#%d -> CPU#%d]: passed\n", in check_tsc_sync_source()
366 pr_warn("TSC synchronization [CPU#%d -> CPU#%d]:\n", in check_tsc_sync_source()
368 pr_warn("Measured %Ld cycles TSC warp between CPUs, " in check_tsc_sync_source()
369 "turning off TSC clock.\n", max_warp); in check_tsc_sync_source()
371 pr_warn("TSC warped randomly between CPUs\n"); in check_tsc_sync_source()
406 /* Also aborts if there is no TSC. */ in check_tsc_sync_target()
411 * Store, verify and sanitize the TSC adjust register. If in check_tsc_sync_target()
414 * The test is also skipped when the TSC is marked reliable. This in check_tsc_sync_target()
416 * SoCs the TSC is frequency synchronized, but still the TSC ADJUST in check_tsc_sync_target()
458 * failed and a retry with adjusted TSC is possible. If zero the in check_tsc_sync_target()
466 * observed time going backwards so this TSC was ahead and in check_tsc_sync_target()
476 * sync mechanism (observed values are ~200 TSC cycles), but this in check_tsc_sync_target()
485 pr_warn("TSC ADJUST compensate: CPU%u observed %lld warp. Adjust: %lld\n", in check_tsc_sync_target()