From owner-svn-src-head@FreeBSD.ORG Wed Nov 26 19:29:33 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E82281065672; Wed, 26 Nov 2008 19:29:33 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D2EE98FC17; Wed, 26 Nov 2008 19:29:33 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAQJTXki064244; Wed, 26 Nov 2008 19:29:33 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAQJTXVM064242; Wed, 26 Nov 2008 19:29:33 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <200811261929.mAQJTXVM064242@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 26 Nov 2008 19:29:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185343 - in head/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Nov 2008 19:29:34 -0000 Author: jkim Date: Wed Nov 26 19:29:33 2008 New Revision: 185343 URL: http://svn.freebsd.org/changeset/base/185343 Log: Use newly introduced cpu_vendor_id to make invariant TSC detection more clearer and merge r185295 to amd64. Modified: head/sys/amd64/amd64/identcpu.c head/sys/i386/i386/identcpu.c Modified: head/sys/amd64/amd64/identcpu.c ============================================================================== --- head/sys/amd64/amd64/identcpu.c Wed Nov 26 19:27:51 2008 (r185342) +++ head/sys/amd64/amd64/identcpu.c Wed Nov 26 19:29:33 2008 (r185343) @@ -360,14 +360,20 @@ printcpuinfo(void) * If this CPU supports P-state invariant TSC then * mention the capability. */ - if (!tsc_is_invariant && - (cpu_vendor_id == CPU_VENDOR_AMD && - ((amd_pminfo & AMDPM_TSC_INVARIANT) != 0 || - AMD64_CPU_FAMILY(cpu_id) >= 0x10 || - cpu_id == 0x60fb2))) { - tsc_is_invariant = 1; - printf("\n TSC: P-state invariant"); + switch (cpu_vendor_id) { + case CPU_VENDOR_AMD: + if ((amd_pminfo & AMDPM_TSC_INVARIANT) || + AMD64_CPU_FAMILY(cpu_id) >= 0x10 || + cpu_id == 0x60fb2) + tsc_is_invariant = 1; + break; + case CPU_VENDOR_INTEL: + if (amd_pminfo & AMDPM_TSC_INVARIANT) + tsc_is_invariant = 1; + break; } + if (tsc_is_invariant) + printf("\n TSC: P-state invariant"); /* * If this CPU supports HTT or CMP then mention the Modified: head/sys/i386/i386/identcpu.c ============================================================================== --- head/sys/i386/i386/identcpu.c Wed Nov 26 19:27:51 2008 (r185342) +++ head/sys/i386/i386/identcpu.c Wed Nov 26 19:29:33 2008 (r185343) @@ -864,15 +864,20 @@ printcpuinfo(void) * If this CPU supports P-state invariant TSC then * mention the capability. */ - if (!tsc_is_invariant && - ((cpu_vendor_id == CPU_VENDOR_AMD || - cpu_vendor_id == CPU_VENDOR_INTEL) && - ((amd_pminfo & AMDPM_TSC_INVARIANT) != 0 || - I386_CPU_FAMILY(cpu_id) >= 0x10 || - cpu_id == 0x60fb2))) { - tsc_is_invariant = 1; - printf("\n TSC: P-state invariant"); + switch (cpu_vendor_id) { + case CPU_VENDOR_AMD: + if ((amd_pminfo & AMDPM_TSC_INVARIANT) || + I386_CPU_FAMILY(cpu_id) >= 0x10 || + cpu_id == 0x60fb2) + tsc_is_invariant = 1; + break; + case CPU_VENDOR_INTEL: + if (amd_pminfo & AMDPM_TSC_INVARIANT) + tsc_is_invariant = 1; + break; } + if (tsc_is_invariant) + printf("\n TSC: P-state invariant"); /* * If this CPU supports HTT or CMP then mention the