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.
24 #include <asm/tsc.h>
37 * TSC's on different sockets may be reset asynchronously.
38 * This may cause the TSC ADJUST value on socket 0 to be NOT 0.
47 pr_info("tsc: Marking TSC async resets true due to %s\n", reason); in mark_tsc_async_resets()
58 /* Skip unnecessary error messages if TSC already unstable */ in tsc_verify_tsc_adjust()
76 pr_warn(FW_BUG "TSC ADJUST differs: CPU%u %lld --> %lld. Restoring\n", in tsc_verify_tsc_adjust()
134 * the TSC is in sync with the already running cpus. in tsc_sanitize_first_cpu()
139 * and socket 0 may not have an TSC ADJUST value of 0. in tsc_sanitize_first_cpu()
143 pr_warn(FW_BUG "TSC ADJUST: CPU%u: %lld force to 0\n", in tsc_sanitize_first_cpu()
148 pr_info("TSC ADJUST: CPU%u: %lld NOT forced to 0\n", in tsc_sanitize_first_cpu()
164 /* Skip unnecessary error messages if TSC already unstable */ in tsc_store_and_check_tsc_adjust()
178 * Store and check the TSC ADJUST MSR if available
222 printk_once(FW_BUG "TSC ADJUST differs within socket(s), fixing all errors\n"); in tsc_store_and_check_tsc_adjust()
252 * of a critical section, to be able to prove TSC time-warps:
262 * TSC-warp measurement loop running on both CPUs. This is not called
263 * if there is no TSC.
278 * We take the global lock, measure TSC, save the in check_tsc_warp()
279 * previous TSC that was measured (possibly on in check_tsc_warp()
280 * another CPU) and update the previous TSC timestamp. in check_tsc_warp()
292 * TSC readout is totally broken]): in check_tsc_warp()
302 * we saw a time-warp of the TSC going backwards: in check_tsc_warp()
320 "Warning: zero tsc calibration delta: %Ld [max: %Ld]\n", in check_tsc_warp()
327 * online, a timeout of 20msec will be used for the TSC-warp measurement
332 * Ideally we should be able to skip the TSC sync check on the other
334 * But as the TSC is per-logical CPU and can potentially be modified wrongly
335 * by the bios, TSC sync test for smaller duration should be able
391 pr_debug("TSC synchronization [CPU#%d -> CPU#%u]: passed\n", in check_tsc_sync_source()
398 pr_warn("TSC synchronization [CPU#%d -> CPU#%u]:\n", in check_tsc_sync_source()
400 pr_warn("Measured %Ld cycles TSC warp between CPUs, " in check_tsc_sync_source()
401 "turning off TSC clock.\n", max_warp); in check_tsc_sync_source()
403 pr_warn("TSC warped randomly between CPUs\n"); in check_tsc_sync_source()
438 /* Also aborts if there is no TSC. */ in check_tsc_sync_target()
443 * Store, verify and sanitize the TSC adjust register. If in check_tsc_sync_target()
446 * The test is also skipped when the TSC is marked reliable. This in check_tsc_sync_target()
448 * SoCs the TSC is frequency synchronized, but still the TSC ADJUST in check_tsc_sync_target()
454 /* Kick the control CPU into the TSC synchronization function */ in check_tsc_sync_target()
491 * failed and a retry with adjusted TSC is possible. If zero the in check_tsc_sync_target()
499 * observed time going backwards so this TSC was ahead and in check_tsc_sync_target()
509 * sync mechanism (observed values are ~200 TSC cycles), but this in check_tsc_sync_target()
518 pr_warn("TSC ADJUST compensate: CPU%u observed %lld warp. Adjust: %lld\n", in check_tsc_sync_target()