Lines Matching refs:cpu_khz
23 unsigned int __read_mostly cpu_khz; /* TSC clocks / usec, not used here */
24 EXPORT_SYMBOL(cpu_khz);
562 unsigned long cpu_khz_old = cpu_khz;
566 cpu_khz = tsc_khz;
569 cpu_khz_old, cpu_khz);
586 * ns = cycles * (10^9 / (cpu_khz * 10^3))
587 * ns = cycles * (10^6 / cpu_khz)
590 * ns = cycles * (10^6 * SC / cpu_khz) / SC
606 static void set_cyc2ns_scale(unsigned long cpu_khz, int cpu)
620 if (cpu_khz) {
621 *scale = (NSEC_PER_MSEC << CYC2NS_SCALE_FACTOR)/cpu_khz;
914 "cpu_khz value may be incorrect.\n");
946 static inline unsigned long calibrate_cpu(void) { return cpu_khz; }
960 cpu_khz = tsc_khz;
969 cpu_khz = calibrate_cpu();
972 (unsigned long)cpu_khz / 1000,
973 (unsigned long)cpu_khz % 1000);
982 set_cyc2ns_scale(cpu_khz, cpu);