return ns;
}
-static void __set_cyc2ns_scale(unsigned long khz, int cpu, unsigned long long tsc_now)
+static void set_cyc2ns_scale(unsigned long khz, int cpu, unsigned long long tsc_now)
{
unsigned long long ns_now;
struct cyc2ns_data data;
local_irq_restore(flags);
}
-static void set_cyc2ns_scale(unsigned long khz, int cpu)
-{
- __set_cyc2ns_scale(khz, cpu, rdtsc());
-}
-
/*
* Scheduler clock - returns current time in nanosec units.
*/
}
#ifdef CONFIG_CPU_FREQ
-
/* Frequency scaling support. Adjust the TSC based timer when the cpu frequency
* changes.
*
if (!(freq->flags & CPUFREQ_CONST_LOOPS))
mark_tsc_unstable("cpufreq changes");
- set_cyc2ns_scale(tsc_khz, freq->cpu);
+ set_cyc2ns_scale(tsc_khz, freq->cpu, rdtsc());
}
return 0;
/* Update the sched_clock() rate to match the clocksource one */
for_each_possible_cpu(cpu)
- __set_cyc2ns_scale(tsc_khz, cpu, tsc_stop);
+ set_cyc2ns_scale(tsc_khz, cpu, tsc_stop);
out:
if (boot_cpu_has(X86_FEATURE_ART))
cyc = rdtsc();
for_each_possible_cpu(cpu) {
cyc2ns_init(cpu);
- __set_cyc2ns_scale(tsc_khz, cpu, cyc);
+ set_cyc2ns_scale(tsc_khz, cpu, cyc);
}
if (tsc_disabled > 0)