patch-2.1.44 linux/include/asm-sparc64/string.h

Next file: linux/include/asm-sparc64/system.h
Previous file: linux/include/asm-sparc64/sigcontext.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.43/linux/include/asm-sparc64/string.h linux/include/asm-sparc64/string.h
@@ -1,4 +1,4 @@
-/* $Id: string.h,v 1.5 1997/05/18 04:16:57 davem Exp $
+/* $Id: string.h,v 1.6 1997/06/24 17:29:14 jj Exp $
  * string.h: External definitions for optimized assembly string
  *           routines for the Linux Kernel.
  *
@@ -13,8 +13,14 @@
 
 #ifdef __KERNEL__
 
+#include <asm/asi.h>
+
 extern void __memmove(void *,const void *,__kernel_size_t);
 extern __kernel_size_t __memcpy(void *,const void *,__kernel_size_t);
+extern __kernel_size_t __memcpy_short(void *,const void *,__kernel_size_t,long,long);
+extern __kernel_size_t __memcpy_entry(void *,const void *,__kernel_size_t,long,long);
+extern __kernel_size_t __memcpy_16plus(void *,const void *,__kernel_size_t,long,long);
+extern __kernel_size_t __memcpy_384plus(void *,const void *,__kernel_size_t,long,long);
 extern __kernel_size_t __memset(void *,int,__kernel_size_t);
 
 #ifndef EXPORT_SYMTAB
@@ -35,32 +41,31 @@
 
 extern inline void *__constant_memcpy(void *to, const void *from, __kernel_size_t n)
 {
-	extern void __copy_1page(void *, const void *);
-
 	if(n) {
 		if(n <= 32) {
 			__builtin_memcpy(to, from, n);
+#if 0			
+		} else if (n < 384) {
+			__memcpy_16plus(to, from, n, ASI_BLK_P, ASI_BLK_P);
 		} else {
-#if 0
-			switch(n) {
-			case 8192:
-				__copy_1page(to, from);
-				break;
-			default:
-#endif
-				__memcpy(to, from, n);
-#if 0
-				break;
-			}
-#endif
+			__memcpy_384plus(to, from, n, ASI_BLK_P, ASI_BLK_P);
 		}
+#else
+		} else {
+			__memcpy(to, from, n);
+		}
+#endif		
 	}
 	return to;
 }
 
 extern inline void *__nonconstant_memcpy(void *to, const void *from, __kernel_size_t n)
 {
+#if 0
+	__memcpy_entry(to, from, n, ASI_BLK_P, ASI_BLK_P);
+#else
 	__memcpy(to, from, n);
+#endif
 	return to;
 }
 
@@ -74,15 +79,13 @@
 
 extern inline void *__constant_c_and_count_memset(void *s, char c, __kernel_size_t count)
 {
-	extern void *bzero_1page(void *);
+	extern void *__bzero_1page(void *);
 	extern __kernel_size_t __bzero(void *, __kernel_size_t);
 
 	if(!c) {
-#if 0
-		if(count == 8192)
-			bzero_1page(s);
+		if (count == 8192)
+			__bzero_1page(s);
 		else
-#endif
 			__bzero(s, count);
 	} else {
 		__memset(s, c, count);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov