patch-2.3.21 linux/include/asm-i386/page.h

Next file: linux/include/asm-i386/string-486.h
Previous file: linux/include/asm-i386/mmx.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.20/linux/include/asm-i386/page.h linux/include/asm-i386/page.h
@@ -11,8 +11,26 @@
 
 #define STRICT_MM_TYPECHECKS
 
+#include <linux/config.h>
+
+#ifdef CONFIG_X86_USE_3DNOW
+
+#include <asm/mmx.h>
+
+#define clear_page(page)	mmx_clear_page(page)
+#define copy_page(to,from)	mmx_copy_page(to,from)
+
+#else
+
+/*
+ *	On older X86 processors its not a win to use MMX here it seems.
+ *	Maybe the K6-III ?
+ */
+ 
 #define clear_page(page)	memset((void *)(page), 0, PAGE_SIZE)
 #define copy_page(to,from)	memcpy((void *)(to), (void *)(from), PAGE_SIZE)
+
+#endif
 
 #ifdef STRICT_MM_TYPECHECKS
 /*

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)