aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386
diff options
context:
space:
mode:
authorjohn stultz <johnstul@us.ibm.com>2007-05-02 13:27:08 -0400
committerAndi Kleen <andi@basil.nowhere.org>2007-05-02 13:27:08 -0400
commit5a90cf205c922707ffed2d8f87cefd942e96b0ba (patch)
tree5e9c9c1be3d149bff7620db89e1ede2317ba7362 /arch/i386
parent2714221985ce6388ec2fa78d7d52e2a5bef78eec (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/i386')
-rw-r--r--arch/i386/kernel/cpu/cyrix.c2
-rw-r--r--arch/i386/kernel/tsc.c5
2 files changed, 4 insertions, 3 deletions
diff --git a/arch/i386/kernel/cpu/cyrix.c b/arch/i386/kernel/cpu/cyrix.c
index f0badfdd4e45..e77f8e1cf7aa 100644
--- a/arch/i386/kernel/cpu/cyrix.c
+++ b/arch/i386/kernel/cpu/cyrix.c
@@ -279,7 +279,7 @@ static void __cpuinit init_cyrix(struct cpuinfo_x86 *c)
279 */ 279 */
280 if (vendor == PCI_VENDOR_ID_CYRIX && 280 if (vendor == PCI_VENDOR_ID_CYRIX &&
281 (device == PCI_DEVICE_ID_CYRIX_5510 || device == PCI_DEVICE_ID_CYRIX_5520)) 281 (device == PCI_DEVICE_ID_CYRIX_5510 || device == PCI_DEVICE_ID_CYRIX_5520))
282 mark_tsc_unstable(); 282 mark_tsc_unstable("cyrix 5510/5520 detected");
283 } 283 }
284#endif 284#endif
285 c->x86_cache_size=16; /* Yep 16K integrated cache thats it */ 285 c->x86_cache_size=16; /* Yep 16K integrated cache thats it */
diff --git a/arch/i386/kernel/tsc.c b/arch/i386/kernel/tsc.c
index 6cb8f5336732..755209dc93e1 100644
--- a/arch/i386/kernel/tsc.c
+++ b/arch/i386/kernel/tsc.c
@@ -233,7 +233,7 @@ time_cpufreq_notifier(struct notifier_block *nb, unsigned long val, void *data)
233 * TSC based sched_clock turns 233 * TSC based sched_clock turns
234 * to junk w/ cpufreq 234 * to junk w/ cpufreq
235 */ 235 */
236 mark_tsc_unstable(); 236 mark_tsc_unstable("cpufreq changes");
237 } 237 }
238 } 238 }
239 } 239 }
@@ -281,11 +281,12 @@ static struct clocksource clocksource_tsc = {
281 CLOCK_SOURCE_MUST_VERIFY, 281 CLOCK_SOURCE_MUST_VERIFY,
282}; 282};
283 283
284void mark_tsc_unstable(void) 284void mark_tsc_unstable(char *reason)
285{ 285{
286 if (!tsc_unstable) { 286 if (!tsc_unstable) {
287 tsc_unstable = 1; 287 tsc_unstable = 1;
288 tsc_enabled = 0; 288 tsc_enabled = 0;
289 printk("Marking TSC unstable due to: %s.\n", reason);
289 /* Can be called before registration */ 290 /* Can be called before registration */
290 if (clocksource_tsc.mult) 291 if (clocksource_tsc.mult)
291 clocksource_change_rating(&clocksource_tsc, 0); 292 clocksource_change_rating(&clocksource_tsc, 0);