[PATCH][2.5][RFT] sfence wmb for K7,P3,VIAC3-2(?)

From: Zwane Mwaikambo (zwane@linuxpower.ca)
Date: Tue Apr 01 2003 - 03:05:24 EST


Stress tested on 8way PIII 700, Dave, does the C3 have sfence?

Index: linux-2.5.66/arch/i386/Kconfig
===================================================================
RCS file: /build/cvsroot/linux-2.5.66/arch/i386/Kconfig,v
retrieving revision 1.1.1.1
diff -u -p -B -r1.1.1.1 Kconfig
--- linux-2.5.66/arch/i386/Kconfig 24 Mar 2003 23:40:26 -0000 1.1.1.1
+++ linux-2.5.66/arch/i386/Kconfig 1 Apr 2003 08:04:42 -0000
@@ -368,6 +368,11 @@ config X86_PREFETCH
         depends on MPENTIUMIII || MPENTIUM4 || MVIAC3_2
         default y
 
+config X86_SSE
+ bool
+ depends on MK7 || MPENTIUMIII || MVIAC3_2
+ default y
+
 config X86_SSE2
         bool
         depends on MK8 || MPENTIUM4
Index: linux-2.5.66/include/asm-i386/system.h
===================================================================
RCS file: /build/cvsroot/linux-2.5.66/include/asm-i386/system.h,v
retrieving revision 1.1.1.1
diff -u -p -B -r1.1.1.1 system.h
--- linux-2.5.66/include/asm-i386/system.h 24 Mar 2003 23:40:20 -0000 1.1.1.1
+++ linux-2.5.66/include/asm-i386/system.h 1 Apr 2003 05:39:00 -0000
@@ -355,11 +355,15 @@ static inline unsigned long __cmpxchg(vo
 
 #define read_barrier_depends() do { } while(0)
 
+#ifdef CONFIG_X86_SSE
+#define wmb() __asm__ __volatile__ ("sfence;": : :"memory")
+#else
 #ifdef CONFIG_X86_OOSTORE
 #define wmb() __asm__ __volatile__ ("lock; addl $0,0(%%esp)": : :"memory")
 #else
 #define wmb() __asm__ __volatile__ ("": : :"memory")
 #endif
+#endif /* CONFIG_X86_SSE */
 
 #ifdef CONFIG_SMP
 #define smp_mb() mb()
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Apr 07 2003 - 22:00:12 EST