diff options
author | pirzyk <pirzyk@FreeBSD.org> | 2002-10-14 19:33:12 +0000 |
---|---|---|
committer | pirzyk <pirzyk@FreeBSD.org> | 2002-10-14 19:33:12 +0000 |
commit | 0bdb757b1abd0d2ef8428f0dbf05e27ee319f61c (patch) | |
tree | a151a94dfb202dce8ca1978e867a6aa99ae43fc1 /sys/i386 | |
parent | e74d131cbcc61445492e898f49fb7706185e5616 (diff) | |
download | FreeBSD-src-0bdb757b1abd0d2ef8428f0dbf05e27ee319f61c.zip FreeBSD-src-0bdb757b1abd0d2ef8428f0dbf05e27ee319f61c.tar.gz |
Add a knob to turn on and off the CMPXCHG instruction on > i386 IA32 systems.
This is most beneficial for vmware client os installs.
Reviewed by: jmallet, iedowse, tlambert2@mindspring.com
MFC After: never, -STABLE does not currently use this instruction
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/conf/NOTES | 5 | ||||
-rw-r--r-- | sys/i386/include/atomic.h | 2 |
2 files changed, 6 insertions, 1 deletions
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) |