From 6545c8c3a26470349b7ca3564cf0ec033393aaa6 Mon Sep 17 00:00:00 2001 From: Andi Kleen Date: Sat, 29 Jul 2006 21:42:37 +0200 Subject: [PATCH] --- yaml --- r: 32891 b: refs/heads/master c: 0e5f61b00c577da698fb00cd9c91a96b79044dfd h: refs/heads/master i: 32889: aeda4f47d5bddc6ee4c3a6b98a794530c3cdbe50 32887: 44a0640f691e5b630042ad7276999e84e74c6b5a v: v3 --- [refs] | 2 +- trunk/arch/x86_64/kernel/time.c | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 65f2b0880aa0..4348f3d449d3 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 260f659b232b17889e3f0c9bf411675898b222c2 +refs/heads/master: 0e5f61b00c577da698fb00cd9c91a96b79044dfd diff --git a/trunk/arch/x86_64/kernel/time.c b/trunk/arch/x86_64/kernel/time.c index e0341c6808e5..7a9b18224182 100644 --- a/trunk/arch/x86_64/kernel/time.c +++ b/trunk/arch/x86_64/kernel/time.c @@ -28,6 +28,7 @@ #include #ifdef CONFIG_ACPI #include /* for PM timer frequency */ +#include #endif #include #include @@ -953,11 +954,18 @@ __cpuinit int unsynchronized_tsc(void) #ifdef CONFIG_SMP if (apic_is_clustered_box()) return 1; - /* Intel systems are normally all synchronized. Exceptions - are handled in the check above. */ - if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) - return 0; #endif + /* Most intel systems have synchronized TSCs except for + multi node systems */ + if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) { +#ifdef CONFIG_ACPI + /* But TSC doesn't tick in C3 so don't use it there */ + if (acpi_fadt.length > 0 && acpi_fadt.plvl3_lat < 100) + return 1; +#endif + return 0; + } + /* Assume multi socket systems are not synchronized */ return num_present_cpus() > 1; }