diff options
author | H. Peter Anvin <hpa@zytor.com> | 2008-08-18 17:39:32 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-08-18 18:22:17 -0700 |
commit | 7e00df5818964298c9821365a6cb7a8304227c5c (patch) | |
tree | 5fdfc9a40deb0a4157bddffed28322a2ff9e5875 /include/asm-x86/required-features.h | |
parent | e2fe16d91228a005811335fbc4fbad5d4f5b75af (diff) |
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 adec887dd7c..5c2ff4bc298 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 |