diff options
author | john stultz <johnstul@us.ibm.com> | 2007-05-02 13:27:08 -0400 |
---|---|---|
committer | Andi Kleen <andi@basil.nowhere.org> | 2007-05-02 13:27:08 -0400 |
commit | 5a90cf205c922707ffed2d8f87cefd942e96b0ba (patch) | |
tree | 5e9c9c1be3d149bff7620db89e1ede2317ba7362 /arch/x86_64/kernel/tsc.c | |
parent | 2714221985ce6388ec2fa78d7d52e2a5bef78eec (diff) |
[PATCH] x86: Log reason why TSC was marked unstable
Change mark_tsc_unstable() so it takes a string argument, which holds the
reason the TSC was marked unstable.
This is then displayed the first time mark_tsc_unstable is called.
This should help us better debug why the TSC was marked unstable on certain
systems and allow us to make sure we're not being overly paranoid when
throwing out this troublesome clocksource.
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Diffstat (limited to 'arch/x86_64/kernel/tsc.c')
-rw-r--r-- | arch/x86_64/kernel/tsc.c | 5 |
1 files changed, 3 insertions, 2 deletions
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 | ||
202 | void mark_tsc_unstable(void) | 202 | void 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); |