Lines Matching full:tsc

33 unsigned int __read_mostly cpu_khz;	/* TSC clocks / usec, not used here */
42 * TSC can be unstable due to cpufreq or due to unsynced TSCs
241 * Fall back to jiffies if there's no TSC available: in native_sched_clock()
242 * ( But note that we still use it if the TSC is marked in native_sched_clock()
254 * Generate a sched_clock if you already have a TSC value.
256 u64 native_sched_clock_from_tsc(u64 tsc) in native_sched_clock_from_tsc() argument
258 return cycles_2_ns(tsc); in native_sched_clock_from_tsc()
302 * disable flag for tsc. Takes effect by clearing the TSC cpu flag
329 pr_alert("%s: Overriding earlier tsc=watchdog with tsc=nowatchdog\n", in tsc_setup()
337 pr_alert("%s: tsc=watchdog overridden by earlier tsc=nowatchdog\n", in tsc_setup()
345 __setup("tsc=", tsc_setup);
351 * Read TSC and the reference counters. Take care of any disturbances
373 * Calculate the TSC frequency from HPET reference
390 * Calculate the TSC frequency from PMTimer reference
419 * Try to calibrate the TSC against the Programmable
420 * Interrupt Timer and return the frequency of the TSC
427 u64 tsc, t1, t2, delta; in pit_calibrate_tsc() local
457 tsc = t1 = t2 = get_cycles(); in pit_calibrate_tsc()
464 delta = t2 - tsc; in pit_calibrate_tsc()
465 tsc = t2; in pit_calibrate_tsc()
507 * see the same MSB (and overhead like doing a single TSC
523 * use the TSC value at the transitions to calculate a pretty
524 * good value for the TSC frequency.
536 u64 tsc = 0, prev_tsc = 0; in pit_expect_msb() local
541 prev_tsc = tsc; in pit_expect_msb()
542 tsc = get_cycles(); in pit_expect_msb()
545 *tscp = tsc; in pit_expect_msb()
549 * will be based on the error terms on the TSC values. in pit_expect_msb()
566 u64 tsc, delta; in quick_pit_calibrate() local
598 if (pit_expect_msb(0xff, &tsc, &d1)) { in quick_pit_calibrate()
603 delta -= tsc; in quick_pit_calibrate()
621 * all TSC reads were stable wrt the PIT. in quick_pit_calibrate()
631 pr_info("Fast TSC calibration failed\n"); in quick_pit_calibrate()
641 * any odd delays anywhere, and the TSC reads are in quick_pit_calibrate()
650 pr_info("Fast TSC calibration using PIT\n"); in quick_pit_calibrate()
656 * Determine TSC frequency via CPUID, else return 0.
671 /* CPUID 15H TSC/Crystal ratio, plus optionally Crystal Hz */ in native_calibrate_tsc()
689 * TSC frequency reported directly by CPUID is a "hardware reported" in native_calibrate_tsc()
713 * For Atom SoCs TSC is the only reliable clocksource. in native_calibrate_tsc()
714 * Mark TSC reliable so no watchdog on it. in native_calibrate_tsc()
768 * zero. In each wait loop iteration we read the TSC and check in pit_hpet_ptimer_calibrate_cpu()
778 * We use separate TSC readouts and check inside of the in pit_hpet_ptimer_calibrate_cpu()
805 /* Pick the lowest PIT TSC calibration so far */ in pit_hpet_ptimer_calibrate_cpu()
860 /* We don't have an alternative source, disable TSC */ in pit_hpet_ptimer_calibrate_cpu()
866 /* The alternative source failed as well, disable TSC */ in pit_hpet_ptimer_calibrate_cpu()
965 * Even on processors with invariant TSC, TSC gets reset in some the
966 * ACPI system sleep states. And in some systems BIOS seem to reinit TSC to
1004 * Frequency scaling support. Adjust the TSC based timer when the CPU frequency
1007 * NOTE: On SMP the situation is not fixable in general, so simply mark the TSC
1073 * If ART is present detect the numerator:denominator to convert to TSC
1083 * Don't enable ART in a VM, non-stop TSC and TSC_ADJUST required, in detect_art()
1084 * and the TSC counter resets must not occur asynchronously. in detect_art()
1113 * We used to compare the TSC to the cycle_last value in the clocksource
1116 * xtime/vsyscall_gtod lock and the other CPU reads a TSC value which
1117 * is smaller than the cycle_last reference value due to a TSC which
1142 pr_info("Marking TSC unstable due to clocksource watchdog\n"); in tsc_cs_mark_unstable()
1164 .name = "tsc-early",
1181 * this one will immediately take over. We will only register if TSC has
1185 .name = "tsc",
1210 pr_info("Marking TSC unstable due to %s\n", reason); in mark_tsc_unstable()
1239 /* Geode_LX - the OLPC CPU has a very reliable TSC */ in check_system_tsc_reliable()
1249 * - TSC running at constant frequency in check_system_tsc_reliable()
1250 * - TSC which does not stop in C-States in check_system_tsc_reliable()
1266 * Make an educated guess if the TSC is trustworthy and synchronized
1286 * Exceptions must mark TSC as unstable: in unsynchronized_tsc()
1298 * Convert ART to TSC given numerator/denominator found in detect_art()
1318 * convert_art_ns_to_tsc() - Convert ART in nanoseconds to TSC.
1323 * to TSC.
1327 * that this flag is set before conversion to TSC is attempted.
1359 * tsc_refine_calibration_work - Further refine tsc freq calibration
1363 * second to further refine the TSC freq value. Since this is
1380 /* Don't bother refining TSC on unstable systems */ in tsc_refine_calibration_work()
1423 …pr_warn("Warning: TSC freq calibrated by CPUID/MSR differs from what is calibrated by HW timer, pl… in tsc_refine_calibration_work()
1424 pr_info("Previous calibrated TSC freq:\t %lu.%03lu MHz\n", in tsc_refine_calibration_work()
1429 pr_info("TSC freq recalibrated by [%s]:\t %lu.%03lu MHz\n", in tsc_refine_calibration_work()
1442 pr_info("Refined TSC clocksource calibration: %lu.%03lu MHz\n", in tsc_refine_calibration_work()
1446 /* Inform the TSC deadline clockevent devices about the recalibration */ in tsc_refine_calibration_work()
1479 * When TSC frequency is known (retrieved via MSR or CPUID), we skip in init_tsc_clocksource()
1503 /* Make sure that cpu and tsc are not already calibrated */ in determine_cpu_tsc_frequencies()
1536 pr_info("Detected %lu.%03lu MHz TSC", in determine_cpu_tsc_frequencies()
1556 /* Sanitize TSC ADJUST before cyc2ns gets initialized */ in tsc_enable_sched_clock()
1566 /* Don't change UV TSC multi-chassis synchronization */ in tsc_early_init()
1591 mark_tsc_unstable("could not calculate TSC khz"); in tsc_init()
1630 * If TSC has constant frequency and TSC is synchronized across in calibrate_delay_is_known()
1637 * If TSC has constant frequency and TSC is not synchronized across in calibrate_delay_is_known()