Lines Matching full:tsc
38 unsigned int __read_mostly cpu_khz; /* TSC clocks / usec, not used here */
47 * TSC can be unstable due to cpufreq or due to unsynced TSCs
247 * Fall back to jiffies if there's no TSC available: in native_sched_clock()
248 * ( But note that we still use it if the TSC is marked in native_sched_clock()
260 * Generate a sched_clock if you already have a TSC value.
262 u64 native_sched_clock_from_tsc(u64 tsc) in native_sched_clock_from_tsc() argument
264 return cycles_2_ns(tsc); in native_sched_clock_from_tsc()
316 * disable flag for tsc. Takes effect by clearing the TSC cpu flag
343 pr_alert("%s: Overriding earlier tsc=watchdog with tsc=nowatchdog\n", in tsc_setup()
351 pr_alert("%s: tsc=watchdog overridden by earlier tsc=nowatchdog\n", in tsc_setup()
359 __setup("tsc=", tsc_setup);
365 * Read TSC and the reference counters. Take care of any disturbances
387 * Calculate the TSC frequency from HPET reference
404 * Calculate the TSC frequency from PMTimer reference
433 * Try to calibrate the TSC against the Programmable
434 * Interrupt Timer and return the frequency of the TSC
441 u64 tsc, t1, t2, delta; in pit_calibrate_tsc() local
471 tsc = t1 = t2 = get_cycles(); in pit_calibrate_tsc()
478 delta = t2 - tsc; in pit_calibrate_tsc()
479 tsc = t2; in pit_calibrate_tsc()
521 * see the same MSB (and overhead like doing a single TSC
537 * use the TSC value at the transitions to calculate a pretty
538 * good value for the TSC frequency.
550 u64 tsc = 0, prev_tsc = 0; in pit_expect_msb() local
555 prev_tsc = tsc; in pit_expect_msb()
556 tsc = get_cycles(); in pit_expect_msb()
559 *tscp = tsc; in pit_expect_msb()
563 * will be based on the error terms on the TSC values. in pit_expect_msb()
580 u64 tsc, delta; in quick_pit_calibrate() local
612 if (pit_expect_msb(0xff, &tsc, &d1)) { in quick_pit_calibrate()
617 delta -= tsc; in quick_pit_calibrate()
635 * all TSC reads were stable wrt the PIT. in quick_pit_calibrate()
645 pr_info("Fast TSC calibration failed\n"); in quick_pit_calibrate()
655 * any odd delays anywhere, and the TSC reads are in quick_pit_calibrate()
664 pr_info("Fast TSC calibration using PIT\n"); in quick_pit_calibrate()
669 * native_calibrate_tsc - determine TSC frequency
670 * Determine TSC frequency via CPUID, else return 0.
685 /* CPUID 15H TSC/Crystal ratio, plus optionally Crystal Hz */ in native_calibrate_tsc()
703 * TSC frequency reported directly by CPUID is a "hardware reported" in native_calibrate_tsc()
727 * For Atom SoCs TSC is the only reliable clocksource. in native_calibrate_tsc()
728 * Mark TSC reliable so no watchdog on it. in native_calibrate_tsc()
782 * zero. In each wait loop iteration we read the TSC and check in pit_hpet_ptimer_calibrate_cpu()
792 * We use separate TSC readouts and check inside of the in pit_hpet_ptimer_calibrate_cpu()
819 /* Pick the lowest PIT TSC calibration so far */ in pit_hpet_ptimer_calibrate_cpu()
874 /* We don't have an alternative source, disable TSC */ in pit_hpet_ptimer_calibrate_cpu()
880 /* The alternative source failed as well, disable TSC */ in pit_hpet_ptimer_calibrate_cpu()
979 * Even on processors with invariant TSC, TSC gets reset in some the
980 * ACPI system sleep states. And in some systems BIOS seem to reinit TSC to
1018 * Frequency scaling support. Adjust the TSC based timer when the CPU frequency
1021 * NOTE: On SMP the situation is not fixable in general, so simply mark the TSC
1085 * If ART is present detect the numerator:denominator to convert to TSC
1095 * Don't enable ART in a VM, non-stop TSC and TSC_ADJUST required, in detect_art()
1096 * and the TSC counter resets must not occur asynchronously. in detect_art()
1126 * We used to compare the TSC to the cycle_last value in the clocksource
1129 * xtime/vsyscall_gtod lock and the other CPU reads a TSC value which
1130 * is smaller than the cycle_last reference value due to a TSC which
1154 pr_info("Marking TSC unstable due to clocksource watchdog\n"); in tsc_cs_mark_unstable()
1176 .name = "tsc-early",
1194 * this one will immediately take over. We will only register if TSC has
1198 .name = "tsc",
1223 pr_info("Marking TSC unstable due to %s\n", reason); in mark_tsc_unstable()
1252 /* Geode_LX - the OLPC CPU has a very reliable TSC */ in check_system_tsc_reliable()
1262 * - TSC running at constant frequency in check_system_tsc_reliable()
1263 * - TSC which does not stop in C-States in check_system_tsc_reliable()
1276 * Make an educated guess if the TSC is trustworthy and synchronized
1296 * Exceptions must mark TSC as unstable: in unsynchronized_tsc()
1310 * tsc_refine_calibration_work - Further refine tsc freq calibration
1314 * second to further refine the TSC freq value. Since this is
1331 /* Don't bother refining TSC on unstable systems */ in tsc_refine_calibration_work()
1374 …pr_warn("Warning: TSC freq calibrated by CPUID/MSR differs from what is calibrated by HW timer, pl… in tsc_refine_calibration_work()
1375 pr_info("Previous calibrated TSC freq:\t %lu.%03lu MHz\n", in tsc_refine_calibration_work()
1380 pr_info("TSC freq recalibrated by [%s]:\t %lu.%03lu MHz\n", in tsc_refine_calibration_work()
1393 pr_info("Refined TSC clocksource calibration: %lu.%03lu MHz\n", in tsc_refine_calibration_work()
1397 /* Inform the TSC deadline clockevent devices about the recalibration */ in tsc_refine_calibration_work()
1432 * When TSC frequency is known (retrieved via MSR or CPUID), we skip in init_tsc_clocksource()
1458 /* Make sure that cpu and tsc are not already calibrated */ in determine_cpu_tsc_frequencies()
1493 pr_info("Detected %lu.%03lu MHz TSC", in determine_cpu_tsc_frequencies()
1513 /* Sanitize TSC ADJUST before cyc2ns gets initialized */ in tsc_enable_sched_clock()
1523 /* Don't change UV TSC multi-chassis synchronization */ in tsc_early_init()
1551 mark_tsc_unstable("could not calculate TSC khz"); in tsc_init()
1590 * If TSC has constant frequency and TSC is synchronized across in calibrate_delay_is_known()
1597 * If TSC has constant frequency and TSC is not synchronized across in calibrate_delay_is_known()