diff options
-rw-r--r-- | sys/amd64/include/atomic.h | 2 | ||||
-rw-r--r-- | sys/conf/options.i386 | 1 | ||||
-rw-r--r-- | sys/i386/conf/NOTES | 5 | ||||
-rw-r--r-- | sys/i386/include/atomic.h | 2 |
4 files changed, 8 insertions, 2 deletions
diff --git a/sys/amd64/include/atomic.h b/sys/amd64/include/atomic.h index 41f3e1a..919bd5a 100644 --- a/sys/amd64/include/atomic.h +++ b/sys/amd64/include/atomic.h @@ -117,7 +117,7 @@ extern void atomic_##NAME##_##TYPE(volatile u_##TYPE *p, u_##TYPE v) #if defined(__GNUC__) -#if defined(I386_CPU) +#if defined(I386_CPU) || defined(CPU_DISABLE_CMPXCHG) static __inline int atomic_cmpset_int(volatile u_int *dst, u_int exp, u_int src) diff --git a/sys/conf/options.i386 b/sys/conf/options.i386 index 289f0f6..4c553bb 100644 --- a/sys/conf/options.i386 +++ b/sys/conf/options.i386 @@ -64,6 +64,7 @@ NO_MEMORY_HOLE opt_cpu.h CPU_ENABLE_SSE opt_cpu.h CPU_ATHLON_SSE_HACK opt_cpu.h CPU_DISABLE_SSE opt_cpu.h +CPU_DISABLE_CMPXCHG opt_global.h # The CPU type affects the endian conversion functions all over the kernel. I386_CPU opt_global.h diff --git a/sys/i386/conf/NOTES b/sys/i386/conf/NOTES index fcd6248..967c6ab 100644 --- a/sys/i386/conf/NOTES +++ b/sys/i386/conf/NOTES @@ -142,6 +142,10 @@ cpu I686_CPU # aka Pentium Pro(tm) # which indicates that the 15-16MB range is *definitely* not being # occupied by an ISA memory hole. # +# CPU_DISABLE_CMPXCHG disables the CMPXCHG instruction on > i386 IA32 +# machines. VmWare seems to emulate this instruction poorly, causing +# the guest OS to run very slowly. +# # NOTE 1: The options, CPU_BTB_EN, CPU_LOOP_EN, CPU_IORT, # CPU_LOOP_EN and CPU_RSTK_EN should not be used because of CPU bugs. # These options may crash your system. @@ -175,6 +179,7 @@ options CPU_WT_ALLOC options CYRIX_CACHE_WORKS options CYRIX_CACHE_REALLY_WORKS #options NO_F00F_HACK +options CPU_DISABLE_CMPXCHG # # A math emulator is mandatory if you wish to run on hardware which diff --git a/sys/i386/include/atomic.h b/sys/i386/include/atomic.h index 41f3e1a..919bd5a 100644 --- a/sys/i386/include/atomic.h +++ b/sys/i386/include/atomic.h @@ -117,7 +117,7 @@ extern void atomic_##NAME##_##TYPE(volatile u_##TYPE *p, u_##TYPE v) #if defined(__GNUC__) -#if defined(I386_CPU) +#if defined(I386_CPU) || defined(CPU_DISABLE_CMPXCHG) static __inline int atomic_cmpset_int(volatile u_int *dst, u_int exp, u_int src) |