From owner-svn-src-all@FreeBSD.ORG Wed Oct 22 15:04:41 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C531E106566B; Wed, 22 Oct 2008 15:04:41 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 47BC18FC19; Wed, 22 Oct 2008 15:04:41 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [IPv6:::1]) (authenticated bits=0) by server.baldwin.cx (8.14.2/8.14.2) with ESMTP id m9MF4TKB017475; Wed, 22 Oct 2008 11:04:35 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: Jung-uk Kim Date: Wed, 22 Oct 2008 11:01:37 -0400 User-Agent: KMail/1.9.7 References: <200810220001.m9M01rLq011948@svn.freebsd.org> In-Reply-To: <200810220001.m9M01rLq011948@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200810221101.37788.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [IPv6:::1]); Wed, 22 Oct 2008 11:04:35 -0400 (EDT) X-Virus-Scanned: ClamAV 0.93.1/8468/Wed Oct 22 08:35:20 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=BAYES_00,NO_RELAYS autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r184146 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Oct 2008 15:04:41 -0000 On Tuesday 21 October 2008 08:01:53 pm Jung-uk Kim wrote: > Author: jkim > Date: Wed Oct 22 00:01:53 2008 > New Revision: 184146 > URL: http://svn.freebsd.org/changeset/base/184146 > > Log: > Set kern.timecounter.invariant_tsc to 1 for AMD CPU family 10h and higher > even if BIOS does not advertise it. > > Modified: > head/sys/amd64/amd64/identcpu.c > head/sys/amd64/include/specialreg.h > head/sys/i386/i386/identcpu.c > head/sys/i386/include/specialreg.h > > Modified: head/sys/amd64/amd64/identcpu.c > ============================================================================== > --- head/sys/amd64/amd64/identcpu.c Tue Oct 21 23:36:28 2008 (r184145) > +++ head/sys/amd64/amd64/identcpu.c Wed Oct 22 00:01:53 2008 (r184146) > @@ -348,7 +348,9 @@ printcpuinfo(void) > cpu_feature &= ~CPUID_HTT; > > if (!tsc_is_invariant && > - (amd_pminfo & AMDPM_TSC_INVARIANT)) { > + (strcmp(cpu_vendor, "AuthenticAMD") == 0 && > + ((amd_pminfo & AMDPM_TSC_INVARIANT) != 0 || > + AMD64_CPU_FAMILY(cpu_id) >= 0x10))) { > tsc_is_invariant = 1; > printf("\n P-state invariant TSC"); > } Perhaps a simpler approach might be to just set AMDPM_TSC_INVARIANT for AMD64_CPU_FAMILY(cpu_id) >= 0x10? -- John Baldwin