summaryrefslogtreecommitdiffstats
path: root/arch/x86_64/kernel/smpboot.c
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2006-01-11 22:45:15 +0100
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-12 04:04:57 +0100
commit737c5c3bde5641af9c24e3a60366674af72a43ef (patch)
treee369c6489279c9fda4a5fb1766fe1966ce9caf87 /arch/x86_64/kernel/smpboot.c
parent[PATCH] x86_64: Fix compile error with !CONFIG_COMPAT (diff)
downloadlinux-737c5c3bde5641af9c24e3a60366674af72a43ef.tar.xz
linux-737c5c3bde5641af9c24e3a60366674af72a43ef.zip
[PATCH] x86_64: Don't try to synchronize the TSC over CPUs on Intel CPUs at boot.
They already do this in hardware and the Linux algorithm actually adds errors. Cc: mingo@elte.hu Cc: rohit.seth@intel.com Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/x86_64/kernel/smpboot.c')
-rw-r--r--arch/x86_64/kernel/smpboot.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/x86_64/kernel/smpboot.c b/arch/x86_64/kernel/smpboot.c
index e6af93b51dce..994728564d6b 100644
--- a/arch/x86_64/kernel/smpboot.c
+++ b/arch/x86_64/kernel/smpboot.c
@@ -335,7 +335,13 @@ static __cpuinit void sync_tsc(unsigned int master)
static void __cpuinit tsc_sync_wait(void)
{
- if (notscsync || !cpu_has_tsc)
+ /*
+ * When the CPU has synchronized TSCs assume the BIOS
+ * or the hardware already synced. Otherwise we could
+ * mess up a possible perfect synchronization with a
+ * not-quite-perfect algorithm.
+ */
+ if (notscsync || !cpu_has_tsc || !unsynchronized_tsc())
return;
sync_tsc(0);
}