public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Joerg Roedel" <joerg.roedel@amd.com>
To: "Andi Kleen" <ak@suse.de>
Cc: linux-kernel@vger.kernel.org,
	"Joachim Deguara" <joachim.deguara@amd.com>,
	"Nagendra, Bhavana" <bhavana.nagendra@amd.com>
Subject: [PATCH] x86_64: remove check for CONSTANT_TSC from time.c
Date: Mon, 4 Jun 2007 19:49:26 +0200	[thread overview]
Message-ID: <20070604174926.GA22013@amd.com> (raw)

[-- 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())

             reply	other threads:[~2007-06-04 18:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-04 17:49 Joerg Roedel [this message]
2007-06-04 18:02 ` [PATCH] x86_64: remove check for CONSTANT_TSC from time.c Andi Kleen
2007-06-04 20:41   ` Joerg Roedel
2007-06-04 22:23     ` Nagendra, Bhavana

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070604174926.GA22013@amd.com \
    --to=joerg.roedel@amd.com \
    --cc=ak@suse.de \
    --cc=bhavana.nagendra@amd.com \
    --cc=joachim.deguara@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox