18 #include <linux/kernel.h>
45 static __cpuinit void check_tsc_warp(
unsigned int timeout)
80 if (now > end || i > 10000000)
91 max_warp =
max(max_warp, prev - now);
97 "Warning: zero tsc calibration delta: %Ld [max: %Ld]\n",
98 now-start, end-start);
115 static inline unsigned int loop_timeout(
int cpu)
117 return (cpumask_weight(cpu_core_mask(cpu)) > 1) ? 2 : 20;
138 "Skipped synchronization checks as TSC is reliable.\n");
157 check_tsc_warp(loop_timeout(cpu));
163 pr_warning(
"TSC synchronization [CPU#%d -> CPU#%d]:\n",
165 pr_warning(
"Measured %Ld cycles TSC warp between CPUs, "
166 "turning off TSC clock.\n", max_warp);
169 pr_debug(
"TSC synchronization [CPU#%d -> CPU#%d]: passed\n",