diff options
author | H. Peter Anvin <hpa@zytor.com> | 2008-08-18 17:39:32 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-09-05 16:13:52 -0700 |
commit | b6734c35af028f06772c0b2c836c7d579e6d4dad (patch) | |
tree | ecdfc0dc851f440b0f5861b8c3fe6b582d516d1b /include/asm-x86/required-features.h | |
parent | b74b06c5f6612a72298f37baa65460a59c26ca67 (diff) | |
download | blackbird-op-linux-b6734c35af028f06772c0b2c836c7d579e6d4dad.tar.gz blackbird-op-linux-b6734c35af028f06772c0b2c836c7d579e6d4dad.zip |
x86: add NOPL as a synthetic CPU feature bit
The long noops ("NOPL") are supposed to be detected by family >= 6.
Unfortunately, several non-Intel x86 implementations, both hardware
and software, don't obey this dictum. Instead, probe for NOPL
directly by executing a NOPL instruction and see if we get #UD.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'include/asm-x86/required-features.h')
-rw-r--r-- | include/asm-x86/required-features.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/asm-x86/required-features.h b/include/asm-x86/required-features.h index adec887dd7cd..5c2ff4bc2980 100644 --- a/include/asm-x86/required-features.h +++ b/include/asm-x86/required-features.h @@ -41,6 +41,12 @@ # define NEED_3DNOW 0 #endif +#if defined(CONFIG_X86_P6_NOP) || defined(CONFIG_X86_64) +# define NEED_NOPL (1<<(X86_FEATURE_NOPL & 31)) +#else +# define NEED_NOPL 0 +#endif + #ifdef CONFIG_X86_64 #define NEED_PSE 0 #define NEED_MSR (1<<(X86_FEATURE_MSR & 31)) @@ -67,7 +73,7 @@ #define REQUIRED_MASK1 (NEED_LM|NEED_3DNOW) #define REQUIRED_MASK2 0 -#define REQUIRED_MASK3 0 +#define REQUIRED_MASK3 (NEED_NOPL) #define REQUIRED_MASK4 0 #define REQUIRED_MASK5 0 #define REQUIRED_MASK6 0 |