1 Jun 2011 01:16
Re: [slubllv5 07/25] x86: Add support for cmpxchg_double
H. Peter Anvin <hpa <at> zytor.com>
2011-05-31 23:16:58 GMT
2011-05-31 23:16:58 GMT
On 05/31/2011 09:53 AM, Christoph Lameter wrote: > Index: linux-2.6/arch/x86/Kconfig.cpu > =================================================================== > --- linux-2.6.orig/arch/x86/Kconfig.cpu 2011-05-31 11:28:24.202948792 -0500 > +++ linux-2.6/arch/x86/Kconfig.cpu 2011-05-31 11:29:36.742948327 -0500 > <at> <at> -312,6 +312,16 <at> <at> config X86_CMPXCHG > config CMPXCHG_LOCAL > def_bool X86_64 || (X86_32 && !M386) > > +# > +# CMPXCHG_DOUBLE needs to be set to enable the kernel to use cmpxchg16/8b > +# for cmpxchg_double if it find processor flags that indicate that the > +# capabilities are available. CMPXCHG_DOUBLE only compiles in > +# detection support. It needs to be set if there is a chance that processor > +# supports these instructions. > +# > +config CMPXCHG_DOUBLE > + def_bool GENERIC_CPU || X86_GENERIC || !M386 > + > config X86_L1_CACHE_SHIFT > int > default "7" if MPENTIUM4 || MPSC Per previous discussion: - Drop this Kconfig option (it is irrelevant.) CONFIG_CMPXCHG_LOCAL is different: it indicates that CMPXCHG is *guaranteed* to exist. > + asm volatile(LOCK_PREFIX_HERE "cmpxchg8b (%%esi); setz %1"\ > + : "d="(__dummy), "=a" (__ret) \(Continue reading)
RSS Feed