aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86_64')
-rw-r--r--arch/x86_64/kernel/time.c2
-rw-r--r--arch/x86_64/kernel/tsc.c5
-rw-r--r--arch/x86_64/kernel/tsc_sync.c2
3 files changed, 5 insertions, 4 deletions
diff --git a/arch/x86_64/kernel/time.c b/arch/x86_64/kernel/time.c
index 5f862e216a42..91c9066a380d 100644
--- a/arch/x86_64/kernel/time.c
+++ b/arch/x86_64/kernel/time.c
@@ -397,7 +397,7 @@ void __init time_init(void)
397 cpu_khz = tsc_calibrate_cpu_khz(); 397 cpu_khz = tsc_calibrate_cpu_khz();
398 398
399 if (unsynchronized_tsc()) 399 if (unsynchronized_tsc())
400 mark_tsc_unstable(); 400 mark_tsc_unstable("TSCs unsynchronized");
401 401
402 if (cpu_has(&boot_cpu_data, X86_FEATURE_RDTSCP)) 402 if (cpu_has(&boot_cpu_data, X86_FEATURE_RDTSCP))
403 vgetcpu_mode = VGETCPU_RDTSCP; 403 vgetcpu_mode = VGETCPU_RDTSCP;
diff --git a/arch/x86_64/kernel/tsc.c b/arch/x86_64/kernel/tsc.c
index 5c84992c676d..48f9a8e6aa91 100644
--- a/arch/x86_64/kernel/tsc.c
+++ b/arch/x86_64/kernel/tsc.c
@@ -111,7 +111,7 @@ static int time_cpufreq_notifier(struct notifier_block *nb, unsigned long val,
111 111
112 tsc_khz = cpufreq_scale(tsc_khz_ref, ref_freq, freq->new); 112 tsc_khz = cpufreq_scale(tsc_khz_ref, ref_freq, freq->new);
113 if (!(freq->flags & CPUFREQ_CONST_LOOPS)) 113 if (!(freq->flags & CPUFREQ_CONST_LOOPS))
114 mark_tsc_unstable(); 114 mark_tsc_unstable("cpufreq changes");
115 } 115 }
116 116
117 set_cyc2ns_scale(tsc_khz_ref); 117 set_cyc2ns_scale(tsc_khz_ref);
@@ -199,10 +199,11 @@ static struct clocksource clocksource_tsc = {
199 .vread = vread_tsc, 199 .vread = vread_tsc,
200}; 200};
201 201
202void mark_tsc_unstable(void) 202void mark_tsc_unstable(char *reason)
203{ 203{
204 if (!tsc_unstable) { 204 if (!tsc_unstable) {
205 tsc_unstable = 1; 205 tsc_unstable = 1;
206 printk("Marking TSC unstable due to %s\n", reason);
206 /* Change only the rating, when not registered */ 207 /* Change only the rating, when not registered */
207 if (clocksource_tsc.mult) 208 if (clocksource_tsc.mult)
208 clocksource_change_rating(&clocksource_tsc, 0); 209 clocksource_change_rating(&clocksource_tsc, 0);
diff --git a/arch/x86_64/kernel/tsc_sync.c b/arch/x86_64/kernel/tsc_sync.c
index 72d444dede9b..355f5f506c81 100644
--- a/arch/x86_64/kernel/tsc_sync.c
+++ b/arch/x86_64/kernel/tsc_sync.c
@@ -138,7 +138,7 @@ void __cpuinit check_tsc_sync_source(int cpu)
138 printk("\n"); 138 printk("\n");
139 printk(KERN_WARNING "Measured %Ld cycles TSC warp between CPUs," 139 printk(KERN_WARNING "Measured %Ld cycles TSC warp between CPUs,"
140 " turning off TSC clock.\n", max_warp); 140 " turning off TSC clock.\n", max_warp);
141 mark_tsc_unstable(); 141 mark_tsc_unstable("check_tsc_sync_source failed");
142 nr_warps = 0; 142 nr_warps = 0;
143 max_warp = 0; 143 max_warp = 0;
144 last_tsc = 0; 144 last_tsc = 0;