]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
x86: don't use P6_NOPs if compiling with CONFIG_X86_GENERIC
authorH. Peter Anvin <hpa@zytor.com>
Tue, 18 Mar 2008 23:23:07 +0000 (19:23 -0400)
committerChris Wright <chrisw@sous-sol.org>
Mon, 24 Mar 2008 18:47:39 +0000 (11:47 -0700)
Commit: 959b3be64cab9160cd74532a49b89cdd918d38e9

x86: don't use P6_NOPs if compiling with CONFIG_X86_GENERIC

P6_NOPs are definitely not supported on some VIA CPUs, and possibly
(unverified) on AMD K7s.  It is also the only thing that prevents a
686 kernel from running on Transmeta TM3x00/5x00 (Crusoe) series.

The performance benefit over generic NOPs is very small, so when
building for generic consumption, avoid using them.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
[cebbert@redhat.com: backport take 2, with parens this time]
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
include/asm-x86/processor_32.h

index 13976b0868376d13f2fa1ad58936948f5a05fab9..787ee2e7dead2b83cbf07134080cc9702c9a59c0 100644 (file)
@@ -712,9 +712,10 @@ static inline unsigned int cpuid_edx(unsigned int op)
 #define ASM_NOP6 K7_NOP6
 #define ASM_NOP7 K7_NOP7
 #define ASM_NOP8 K7_NOP8
-#elif defined(CONFIG_M686) || defined(CONFIG_MPENTIUMII) || \
+#elif (defined(CONFIG_M686) || defined(CONFIG_MPENTIUMII) || \
       defined(CONFIG_MPENTIUMIII) || defined(CONFIG_MPENTIUMM) || \
-      defined(CONFIG_MCORE2) || defined(CONFIG_PENTIUM4)
+      defined(CONFIG_MCORE2) || defined(CONFIG_PENTIUM4)) && \
+      !defined(CONFIG_X86_GENERIC)
 #define ASM_NOP1 P6_NOP1
 #define ASM_NOP2 P6_NOP2
 #define ASM_NOP3 P6_NOP3