From owner-svn-src-head@FreeBSD.ORG Thu Aug 15 21:09:06 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 60793E4E; Thu, 15 Aug 2013 21:09:06 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4D60929E6; Thu, 15 Aug 2013 21:09:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7FL96bC014846; Thu, 15 Aug 2013 21:09:06 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7FL95Ik014843; Thu, 15 Aug 2013 21:09:05 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201308152109.r7FL95Ik014843@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 15 Aug 2013 21:09:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254384 - head/sys/i386/i386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 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: Thu, 15 Aug 2013 21:09:06 -0000 Author: jkim Date: Thu Aug 15 21:09:05 2013 New Revision: 254384 URL: http://svnweb.freebsd.org/changeset/base/254384 Log: Simplify check for CMPXCHG8B instruction. Note CMPXCHG8B instruction is always available for Rise mP6 processors although it is not set by CPUID. Modified: head/sys/i386/i386/initcpu.c head/sys/i386/i386/machdep.c Modified: head/sys/i386/i386/initcpu.c ============================================================================== --- head/sys/i386/i386/initcpu.c Thu Aug 15 21:06:38 2013 (r254383) +++ head/sys/i386/i386/initcpu.c Thu Aug 15 21:09:05 2013 (r254384) @@ -424,6 +424,19 @@ init_6x86(void) #ifdef I586_CPU /* + * Rise mP6 + */ +static void +init_rise(void) +{ + + /* + * The CMPXCHG8B instruction is always available but hidden. + */ + cpu_feature |= CPUID_CX8; +} + +/* * IDT WinChip C6/2/2A/2B/3 * * http://www.centtech.com/winchip_bios_writers_guide_v4_0.pdf @@ -690,6 +703,9 @@ initializecpu(void) case CPU_VENDOR_TRANSMETA: init_transmeta(); break; + case CPU_VENDOR_RISE: + init_rise(); + break; } break; #endif Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Thu Aug 15 21:06:38 2013 (r254383) +++ head/sys/i386/i386/machdep.c Thu Aug 15 21:09:05 2013 (r254384) @@ -1557,8 +1557,7 @@ static void cpu_probe_cmpxchg8b(void) { - if ((cpu_feature & CPUID_CX8) != 0 || - cpu_vendor_id == CPU_VENDOR_RISE) { + if ((cpu_feature & CPUID_CX8) != 0) { atomic_load_acq_64 = atomic_load_acq_64_i586; atomic_store_rel_64 = atomic_store_rel_64_i586; }