svn commit: r254391 - projects/atomic64/sys/i386/i386
Jung-uk Kim
jkim at FreeBSD.org
Fri Aug 16 00:00:37 UTC 2013
Author: jkim
Date: Fri Aug 16 00:00:36 2013
New Revision: 254391
URL: http://svnweb.freebsd.org/changeset/base/254391
Log:
MFC: r254384
Simplify check for CMPXCHG8B instruction. Note CMPXCHG8B instruction is
always available for Rise mP6 processors although it is not set by CPUID.
Modified:
projects/atomic64/sys/i386/i386/initcpu.c
projects/atomic64/sys/i386/i386/machdep.c
Modified: projects/atomic64/sys/i386/i386/initcpu.c
==============================================================================
--- projects/atomic64/sys/i386/i386/initcpu.c Thu Aug 15 23:58:16 2013 (r254390)
+++ projects/atomic64/sys/i386/i386/initcpu.c Fri Aug 16 00:00:36 2013 (r254391)
@@ -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: projects/atomic64/sys/i386/i386/machdep.c
==============================================================================
--- projects/atomic64/sys/i386/i386/machdep.c Thu Aug 15 23:58:16 2013 (r254390)
+++ projects/atomic64/sys/i386/i386/machdep.c Fri Aug 16 00:00:36 2013 (r254391)
@@ -1554,8 +1554,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)
cpu_ident_cmxchg8b = 1;
}
More information about the svn-src-projects
mailing list