public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: make clflush a required feature on x86_64
@ 2008-01-18  4:59 Kyle McMartin
  2008-01-18  5:04 ` H. Peter Anvin
  2008-01-18  5:53 ` [PATCH] x86: make clflush a required feature on x86_64 Andi Kleen
  0 siblings, 2 replies; 11+ messages in thread
From: Kyle McMartin @ 2008-01-18  4:59 UTC (permalink / raw)
  To: hpa; +Cc: tglx, mingo, linux-kernel

Hopefully nobody will be stupid enough to implement a cpu without
it. Frankly, it seems safe enough given we already require SSE2.

This means the compiler can optimise away "if (!cpu_has_clflush)"
blocks.

Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
---
 include/asm-x86/cpufeature_64.h     |    3 +++
 include/asm-x86/required-features.h |    4 +++-
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/include/asm-x86/cpufeature_64.h b/include/asm-x86/cpufeature_64.h
index e18496b..ef11d27 100644
--- a/include/asm-x86/cpufeature_64.h
+++ b/include/asm-x86/cpufeature_64.h
@@ -18,6 +18,9 @@
 #undef  cpu_has_mp
 #define cpu_has_mp             1 /* XXX */
 
+#undef	cpu_has_clflush
+#define	cpu_has_clflush        1
+
 #undef  cpu_has_k6_mtrr
 #define cpu_has_k6_mtrr        0
 
diff --git a/include/asm-x86/required-features.h b/include/asm-x86/required-features.h
index 7400d3a..cc27664 100644
--- a/include/asm-x86/required-features.h
+++ b/include/asm-x86/required-features.h
@@ -45,6 +45,7 @@
 #define NEED_XMM	(1<<(X86_FEATURE_XMM & 31))
 #define NEED_XMM2	(1<<(X86_FEATURE_XMM2 & 31))
 #define NEED_LM		(1<<(X86_FEATURE_LM & 31))
+#define NEED_CLFLSH	(1<<(X86_FEATURE_CLFLSH & 31))
 #else
 #define NEED_PSE	0
 #define NEED_MSR	0
@@ -53,11 +54,12 @@
 #define NEED_XMM	0
 #define NEED_XMM2	0
 #define NEED_LM		0
+#define NEED_CLFLSH	0
 #endif
 
 #define REQUIRED_MASK0	(NEED_FPU|NEED_PSE|NEED_MSR|NEED_PAE|\
 			 NEED_CX8|NEED_PGE|NEED_FXSR|NEED_CMOV|\
-			 NEED_XMM|NEED_XMM2)
+			 NEED_XMM|NEED_XMM2|NEED_CLFLSH)
 #define SSE_MASK	(NEED_XMM|NEED_XMM2)
 
 #define REQUIRED_MASK1	(NEED_LM|NEED_3DNOW)
-- 
1.5.3.7


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2008-01-23 12:49 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-18  4:59 [PATCH] x86: make clflush a required feature on x86_64 Kyle McMartin
2008-01-18  5:04 ` H. Peter Anvin
2008-01-18  5:25   ` [PATCH] x86_64: remove redundant cpu_has_ definitions Kyle McMartin
2008-01-18  8:07     ` Ingo Molnar
2008-01-18  5:53 ` [PATCH] x86: make clflush a required feature on x86_64 Andi Kleen
2008-01-18  6:01   ` Kyle McMartin
2008-01-18  6:27     ` H. Peter Anvin
2008-01-11 18:16       ` Pavel Machek
2008-01-18  6:54       ` Andi Kleen
2008-01-18 13:56         ` H. Peter Anvin
2008-01-18 14:18           ` Andi Kleen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox