public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86_64: remove check for CONSTANT_TSC from time.c
@ 2007-06-04 17:49 Joerg Roedel
  2007-06-04 18:02 ` Andi Kleen
  0 siblings, 1 reply; 4+ messages in thread
From: Joerg Roedel @ 2007-06-04 17:49 UTC (permalink / raw)
  To: Andi Kleen; +Cc: linux-kernel, Joachim Deguara, Nagendra, Bhavana

[-- Attachment #1: Type: text/plain, Size: 796 bytes --]

From: Joerg Roedel <joerg.roedel@amd.com>

This patch removes the check for the CONSTANT_TSC cpu flag from time.c
on the x86_64 architecture. At the time this flag is checked at boot the
cpu init code was yet not executed and thus the check fails. At this
point the check for VENDOR_AMD and cpu family 0x10 is sufficient.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>

-- 
           |           AMD Saxony Limited Liability Company & Co. KG
 Operating |         Wilschdorfer Landstr. 101, 01109 Dresden, Germany
 System    |                  Register Court Dresden: HRA 4896
 Research  |              General Partner authorized to represent:
 Center    |             AMD Saxony LLC (Wilmington, Delaware, US)
           | General Manager of AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy

[-- Attachment #2: gh-tsc-fix-fix.patch --]
[-- Type: text/plain, Size: 548 bytes --]

diff --git a/arch/x86_64/kernel/time.c b/arch/x86_64/kernel/time.c
index 4a0895b..8b29928 100644
--- a/arch/x86_64/kernel/time.c
+++ b/arch/x86_64/kernel/time.c
@@ -394,9 +394,9 @@ void __init time_init(void)
 	}
 
 	cpu_khz = tsc_khz;
-	if (cpu_has(&boot_cpu_data, X86_FEATURE_CONSTANT_TSC) &&
-		boot_cpu_data.x86_vendor == X86_VENDOR_AMD &&
+	if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD &&
 		boot_cpu_data.x86 == 16)
+		/* AMD Family 0x10 processors have a constant tsc */
 		cpu_khz = tsc_calibrate_cpu_khz();
 
 	if (unsynchronized_tsc())

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-06-04 22:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-04 17:49 [PATCH] x86_64: remove check for CONSTANT_TSC from time.c Joerg Roedel
2007-06-04 18:02 ` Andi Kleen
2007-06-04 20:41   ` Joerg Roedel
2007-06-04 22:23     ` Nagendra, Bhavana

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox