linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86: fix warning for unsynchronized TSCs (was: avoid modifying global flag tsc_unstable in unsychronized)
@ 2009-11-21 14:48 Gernot Hillier
  0 siblings, 0 replies; only message in thread
From: Gernot Hillier @ 2009-11-21 14:48 UTC (permalink / raw)
  To: x86, Ingo Molnar, Thomas Gleixner, H. Peter Anvin; +Cc: linux-kernel

From: Gernot Hillier <gernot.hillier@siemens.com>

This is a small reminder for a patch I sent some weeks ago. 
It was already confirmed by Alok (see 
http://article.gmane.org/gmane.linux.kernel/901641). I also 
decided to give it a better summary. Here's the original 
description from last mail:

The current behavior of unsynchronized_tsc() prevents the warning for
unsychronized TSCs to be printed: tsc_init() calls unsynchronized_tsc()
first to check for such problems; if found, mark_tsc_unstable() is
called. However, the latter bails out immediately as unsynchronized_
tsc() did already set the global flag tsc_unstable. Thus, the intended
warning message "Marking TSC unstable due to TSCs unsynchronized" won't
show up.

This patch changes the behavior for unsynchronized_tsc() to only *check*
for the quirk condition, but not to modify any global flags. If I'm not
mistaken, the only place to *set* the flag shall be mark_tsc_unstable().

Signed-off-by: Gernot Hillier <gernot.hillier@siemens.com>
Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Wolfgang Mauerer <wolfgang.mauerer@siemens.com>
Reviewed-by: Alok Kataria <akataria@vmware.com>

diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c
index cd982f4..ffbb786 100644
--- a/arch/x86/kernel/tsc.c
+++ b/arch/x86/kernel/tsc.c
@@ -836,10 +836,10 @@ __cpuinit int unsynchronized_tsc(void)
 	if (boot_cpu_data.x86_vendor != X86_VENDOR_INTEL) {
 		/* assume multi socket systems are not synchronized: */
 		if (num_possible_cpus() > 1)
-			tsc_unstable = 1;
+			return 1;
 	}
 
-	return tsc_unstable;
+	return 0;
 }
 
 static void __init init_tsc_clocksource(void)

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-11-21 14:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-21 14:48 [PATCH] x86: fix warning for unsynchronized TSCs (was: avoid modifying global flag tsc_unstable in unsychronized) Gernot Hillier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).