diff options
25 files changed, 11 insertions, 322 deletions
diff --git a/arch/alpha/kernel/alpha_ksyms.c b/arch/alpha/kernel/alpha_ksyms.c index f897d9116aae..23b0f9fd5ba0 100644 --- a/arch/alpha/kernel/alpha_ksyms.c +++ b/arch/alpha/kernel/alpha_ksyms.c @@ -167,7 +167,6 @@ EXPORT_SYMBOL(sys_wait4); EXPORT_SYMBOL(csum_tcpudp_magic); EXPORT_SYMBOL(ip_compute_csum); EXPORT_SYMBOL(ip_fast_csum); -EXPORT_SYMBOL(csum_partial_copy); EXPORT_SYMBOL(csum_partial_copy_nocheck); EXPORT_SYMBOL(csum_partial_copy_from_user); EXPORT_SYMBOL(csum_ipv6_magic); diff --git a/arch/alpha/lib/csum_partial_copy.c b/arch/alpha/lib/csum_partial_copy.c index f8129b5f50d3..a24a4e1abdbc 100644 --- a/arch/alpha/lib/csum_partial_copy.c +++ b/arch/alpha/lib/csum_partial_copy.c @@ -385,16 +385,3 @@ csum_partial_copy_nocheck(const char *src, char *dst, int len, unsigned int sum) { return do_csum_partial_copy_from_user(src, dst, len, sum, NULL); } - -unsigned int -csum_partial_copy (const char *src, char *dst, int len, unsigned int sum) -{ - unsigned int ret; - int error = 0; - - ret = do_csum_partial_copy_from_user(src, dst, len, sum, &error); - if (error) - printk("csum_partial_copy_old(): tell mingo to convert me!\n"); - - return ret; -} diff --git a/arch/cris/lib/old_checksum.c b/arch/cris/lib/old_checksum.c index ae0f7b9eb299..52be69146e30 100644 --- a/arch/cris/lib/old_checksum.c +++ b/arch/cris/lib/old_checksum.c @@ -80,48 +80,3 @@ unsigned int csum_partial(const unsigned char * buff, int len, unsigned int sum) BITOFF; return(sum); } - -#if 0 - -/* - * copy while checksumming, otherwise like csum_partial - */ - -unsigned int csum_partial_copy(const unsigned char *src, unsigned char *dst, - int len, unsigned int sum) -{ - const unsigned char *endMarker; - const unsigned char *marker; - printk("csum_partial_copy len %d.\n", len); -#if 0 - if((int)src & 0x3) - printk("unaligned src %p\n", src); - if((int)dst & 0x3) - printk("unaligned dst %p\n", dst); - __delay(1800); /* extra delay of 90 us to test performance hit */ -#endif - endMarker = src + len; - marker = endMarker - (len % 16); - CBITON; - while(src < marker) { - sum += (*((unsigned short *)dst)++ = *((unsigned short *)src)++); - sum += (*((unsigned short *)dst)++ = *((unsigned short *)src)++); - sum += (*((unsigned short *)dst)++ = *((unsigned short *)src)++); - sum += (*((unsigned short *)dst)++ = *((unsigned short *)src)++); - sum += (*((unsigned short *)dst)++ = *((unsigned short *)src)++); - sum += (*((unsigned short *)dst)++ = *((unsigned short *)src)++); - sum += (*((unsigned short *)dst)++ = *((unsigned short *)src)++); - sum += (*((unsigned short *)dst)++ = *((unsigned short *)src)++); - } - marker = endMarker - (len % 2); - while(src < marker) { - sum += (*((unsigned short *)dst)++ = *((unsigned short *)src)++); - } - if(endMarker - src > 0) { - sum += (*dst = *src); /* add extra byte seperately */ - } - CBITOFF; - return(sum); -} - -#endif diff --git a/arch/ia64/lib/csum_partial_copy.c b/arch/ia64/lib/csum_partial_copy.c index 9f88404011be..3549e0082d95 100644 --- a/arch/ia64/lib/csum_partial_copy.c +++ b/arch/ia64/lib/csum_partial_copy.c @@ -146,16 +146,3 @@ csum_partial_copy_nocheck(const char *src, char *dst, int len, unsigned int sum) return do_csum_partial_copy_from_user(src, dst, len, sum, NULL); } -unsigned int -csum_partial_copy (const char *src, char *dst, int len, unsigned int sum) -{ - unsigned int ret; - int error = 0; - - ret = do_csum_partial_copy_from_user(src, dst, len, sum, &error); - if (error) - printk("csum_partial_copy_old(): tell mingo to convert me!\n"); - - return ret; -} - diff --git a/arch/m68k/kernel/m68k_ksyms.c b/arch/m68k/kernel/m68k_ksyms.c index 3efad5ad086d..9465dcb734c7 100644 --- a/arch/m68k/kernel/m68k_ksyms.c +++ b/arch/m68k/kernel/m68k_ksyms.c @@ -61,9 +61,6 @@ EXPORT_SYMBOL(kernel_thread); EXPORT_SYMBOL(vme_brdtype); #endif -/* Networking helper routines. */ -EXPORT_SYMBOL(csum_partial_copy); - /* The following are special because they're not called explicitly (the C compiler generates them). Fortunately, their interface isn't gonna change any time soon now, so diff --git a/arch/m68k/lib/checksum.c b/arch/m68k/lib/checksum.c index 5110cac4ab33..3699c5a3e635 100644 --- a/arch/m68k/lib/checksum.c +++ b/arch/m68k/lib/checksum.c @@ -318,103 +318,3 @@ csum_partial_copy_from_user(const char *src, char *dst, int len, return(sum); } - -/* - * copy from kernel space while checksumming, otherwise like csum_partial - */ - -unsigned int -csum_partial_copy(const char *src, char *dst, int len, int sum) -{ - unsigned long tmp1, tmp2; - __asm__("movel %2,%4\n\t" - "btst #1,%4\n\t" /* Check alignment */ - "jeq 2f\n\t" - "subql #2,%1\n\t" /* buff%4==2: treat first word */ - "jgt 1f\n\t" - "addql #2,%1\n\t" /* len was == 2, treat only rest */ - "jra 4f\n" - "1:\t" - "movew %2@+,%4\n\t" /* add first word to sum */ - "addw %4,%0\n\t" - "movew %4,%3@+\n\t" - "clrl %4\n\t" - "addxl %4,%0\n" /* add X bit */ - "2:\t" - /* unrolled loop for the main part: do 8 longs at once */ - "movel %1,%4\n\t" /* save len in tmp1 */ - "lsrl #5,%1\n\t" /* len/32 */ - "jeq 2f\n\t" /* not enough... */ - "subql #1,%1\n" - "1:\t" - "movel %2@+,%5\n\t" - "addxl %5,%0\n\t" - "movel %5,%3@+\n\t" - "movel %2@+,%5\n\t" - "addxl %5,%0\n\t" - "movel %5,%3@+\n\t" - "movel %2@+,%5\n\t" - "addxl %5,%0\n\t" - "movel %5,%3@+\n\t" - "movel %2@+,%5\n\t" - "addxl %5,%0\n\t" - "movel %5,%3@+\n\t" - "movel %2@+,%5\n\t" - "addxl %5,%0\n\t" - "movel %5,%3@+\n\t" - "movel %2@+,%5\n\t" - "addxl %5,%0\n\t" - "movel %5,%3@+\n\t" - "movel %2@+,%5\n\t" - "addxl %5,%0\n\t" - "movel %5,%3@+\n\t" - "movel %2@+,%5\n\t" - "addxl %5,%0\n\t" - "movel %5,%3@+\n\t" - "dbra %1,1b\n\t" - "clrl %5\n\t" - "addxl %5,%0\n\t" /* add X bit */ - "clrw %1\n\t" - "subql #1,%1\n\t" - "jcc 1b\n" - "2:\t" - "movel %4,%1\n\t" /* restore len from tmp1 */ - "andw #0x1c,%4\n\t" /* number of rest longs */ - "jeq 4f\n\t" - "lsrw #2,%4\n\t" - "subqw #1,%4\n" - "3:\t" - /* loop for rest longs */ - "movel %2@+,%5\n\t" - "addxl %5,%0\n\t" - "movel %5,%3@+\n\t" - "dbra %4,3b\n\t" - "clrl %5\n\t" - "addxl %5,%0\n" /* add X bit */ - "4:\t" - /* now check for rest bytes that do not fit into longs */ - "andw #3,%1\n\t" - "jeq 7f\n\t" - "clrl %5\n\t" /* clear tmp2 for rest bytes */ - "subqw #2,%1\n\t" - "jlt 5f\n\t" - "movew %2@+,%5\n\t" /* have rest >= 2: get word */ - "movew %5,%3@+\n\t" - "swap %5\n\t" /* into bits 16..31 */ - "tstw %1\n\t" /* another byte? */ - "jeq 6f\n" - "5:\t" - "moveb %2@,%5\n\t" /* have odd rest: get byte */ - "moveb %5,%3@+\n\t" - "lslw #8,%5\n" /* into bits 8..15; 16..31 untouched */ - "6:\t" - "addl %5,%0\n\t" /* now add rest long to sum */ - "clrl %5\n\t" - "addxl %5,%0\n" /* add X bit */ - "7:\t" - : "=d" (sum), "=d" (len), "=a" (src), "=a" (dst), - "=&d" (tmp1), "=&d" (tmp2) - : "0" (sum), "1" (len), "2" (src), "3" (dst) - ); - return(sum); -} diff --git a/arch/mips/kernel/mips_ksyms.c b/arch/mips/kernel/mips_ksyms.c index 8433873ff80c..1ee7d3939ec8 100644 --- a/arch/mips/kernel/mips_ksyms.c +++ b/arch/mips/kernel/mips_ksyms.c @@ -79,9 +79,6 @@ EXPORT_SYMBOL_NOVERS(__strnlen_user_nocheck_asm); EXPORT_SYMBOL_NOVERS(__strnlen_user_asm); -/* Networking helper routines. */ -EXPORT_SYMBOL(csum_partial_copy); - /* * Functions to control caches. */ diff --git a/arch/mips/lib/csum_partial_copy.c b/arch/mips/lib/csum_partial_copy.c index c73ae974c1af..3827f1af34ee 100644 --- a/arch/mips/lib/csum_partial_copy.c +++ b/arch/mips/lib/csum_partial_copy.c @@ -25,8 +25,8 @@ /* * copy while checksumming, otherwise like csum_partial */ -unsigned int csum_partial_copy(const char *src, char *dst, - int len, unsigned int sum) +unsigned int csum_partial_copy_nocheck(const char *src, char *dst, + int len, unsigned int sum) { /* * It's 2:30 am and I don't feel like doing it real ... diff --git a/arch/mips64/kernel/mips64_ksyms.c b/arch/mips64/kernel/mips64_ksyms.c index da8d6ed1391c..c18a50df3ada 100644 --- a/arch/mips64/kernel/mips64_ksyms.c +++ b/arch/mips64/kernel/mips64_ksyms.c @@ -75,9 +75,6 @@ EXPORT_SYMBOL_NOVERS(__strnlen_user_nocheck_asm); EXPORT_SYMBOL_NOVERS(__strnlen_user_asm); -/* Networking helper routines. */ -EXPORT_SYMBOL(csum_partial_copy); - /* * Functions to control caches. */ diff --git a/arch/mips64/lib/csum_partial_copy.c b/arch/mips64/lib/csum_partial_copy.c index 493b945c9a76..e9d22251f194 100644 --- a/arch/mips64/lib/csum_partial_copy.c +++ b/arch/mips64/lib/csum_partial_copy.c @@ -16,8 +16,8 @@ /* * copy while checksumming, otherwise like csum_partial */ -unsigned int csum_partial_copy(const char *src, char *dst, - int len, unsigned int sum) +unsigned int csum_partial_copy_nocheck(const char *src, char *dst, + int len, unsigned int sum) { /* * It's 2:30 am and I don't feel like doing it real ... diff --git a/arch/parisc/lib/checksum.c b/arch/parisc/lib/checksum.c index fa02027dd78f..4145dd0442b6 100644 --- a/arch/parisc/lib/checksum.c +++ b/arch/parisc/lib/checksum.c @@ -97,8 +97,8 @@ unsigned int csum_partial(const unsigned char *buff, int len, unsigned int sum) /* * copy while checksumming, otherwise like csum_partial */ -unsigned int csum_partial_copy(const char *src, char *dst, - int len, unsigned int sum) +unsigned int csum_partial_copy_nocheck(const char *src, char *dst, + int len, unsigned int sum) { /* * It's 2:30 am and I don't feel like doing it real ... diff --git a/arch/sh/kernel/sh_ksyms.c b/arch/sh/kernel/sh_ksyms.c index 6ef33a1274d7..6d64eecac2e1 100644 --- a/arch/sh/kernel/sh_ksyms.c +++ b/arch/sh/kernel/sh_ksyms.c @@ -36,9 +36,6 @@ EXPORT_SYMBOL(disable_irq_nosync); EXPORT_SYMBOL(irq_desc); EXPORT_SYMBOL(no_irq_type); -/* Networking helper routines. */ -EXPORT_SYMBOL(csum_partial_copy); - EXPORT_SYMBOL(strpbrk); EXPORT_SYMBOL(strstr); EXPORT_SYMBOL(strlen); diff --git a/include/asm-alpha/checksum.h b/include/asm-alpha/checksum.h index 5c1fa2e5bdf3..c9501f230756 100644 --- a/include/asm-alpha/checksum.h +++ b/include/asm-alpha/checksum.h @@ -42,14 +42,6 @@ extern unsigned int csum_partial(const unsigned char * buff, int len, unsigned i * * here even more important to align src and dst on a 32-bit (or even * better 64-bit) boundary - * - * this will go away soon. - */ -unsigned int csum_partial_copy(const char *src, char *dst, int len, unsigned int sum); - -/* - * this is a new version of the above that records errors it finds in *errp, - * but continues and zeros the rest of the buffer. */ unsigned int csum_partial_copy_from_user(const char *src, char *dst, int len, unsigned int sum, int *errp); diff --git a/include/asm-i386/checksum.h b/include/asm-i386/checksum.h index a9bcb06e7207..15d7909bfe3c 100644 --- a/include/asm-i386/checksum.h +++ b/include/asm-i386/checksum.h @@ -50,14 +50,6 @@ unsigned int csum_partial_copy_from_user ( const char *src, char *dst, } /* - * This is the old (and unsafe) way of doing checksums, a warning message will - * be printed if it is used and an exeption occurs. - * - * this function should go away after some time. - */ -unsigned int csum_partial_copy( const char *src, char *dst, int len, int sum); - -/* * This is a version of ip_compute_csum() optimized for IP headers, * which always checksum on 4 octet boundaries. * diff --git a/include/asm-ia64/checksum.h b/include/asm-ia64/checksum.h index 397c2e28f46b..6e2dc999b2b4 100644 --- a/include/asm-ia64/checksum.h +++ b/include/asm-ia64/checksum.h @@ -48,15 +48,6 @@ extern unsigned int csum_partial (const unsigned char * buff, int len, * * Here it is even more important to align src and dst on a 32-bit (or * even better 64-bit) boundary. - * - * this will go away soon. - */ -extern unsigned int csum_partial_copy (const char *src, char *dst, int len, - unsigned int sum); - -/* - * This is a new version of the above that records errors it finds in - * *errp, but continues and zeros the rest of the buffer. */ extern unsigned int csum_partial_copy_from_user (const char *src, char *dst, int len, unsigned int sum, diff --git a/include/asm-m68k/checksum.h b/include/asm-m68k/checksum.h index c6847a43adb8..f3fa10674a9e 100644 --- a/include/asm-m68k/checksum.h +++ b/include/asm-m68k/checksum.h @@ -21,18 +21,6 @@ unsigned int csum_partial(const unsigned char * buff, int len, unsigned int sum) * * here even more important to align src and dst on a 32-bit (or even * better 64-bit) boundary - * - * this will go away soon. - */ - -unsigned int csum_partial_copy(const char *src, char *dst, int len, int sum); - - -/* - * the same as csum_partial_copy, but copies from user space. - * - * here even more important to align src and dst on a 32-bit (or even - * better 64-bit) boundary */ extern unsigned int csum_partial_copy_from_user(const char *src, char *dst, diff --git a/include/asm-mips/checksum.h b/include/asm-mips/checksum.h index b5ae00af71f7..55932940b64b 100644 --- a/include/asm-mips/checksum.h +++ b/include/asm-mips/checksum.h @@ -28,12 +28,6 @@ unsigned int csum_partial(const unsigned char *buff, int len, unsigned int sum); * this is a new version of the above that records errors it finds in *errp, * but continues and zeros the rest of the buffer. */ -#define csum_partial_copy_nocheck csum_partial_copy - -/* - * this is a new version of the above that records errors it finds in *errp, - * but continues and zeros the rest of the buffer. - */ unsigned int csum_partial_copy_from_user(const char *src, char *dst, int len, unsigned int sum, int *errp); @@ -58,11 +52,9 @@ extern inline unsigned int csum_and_copy_to_user (const char *src, char *dst, /* * the same as csum_partial, but copies from user space (but on MIPS * we have just one address space, so this is identical to the above) - * - * this is obsolete and will go away. */ -unsigned int csum_partial_copy(const char *src, char *dst, int len, - unsigned int sum); +unsigned int csum_partial_copy_nocheck(const char *src, char *dst, int len, + unsigned int sum); /* * Fold a partial checksum without adding pseudo headers diff --git a/include/asm-mips64/checksum.h b/include/asm-mips64/checksum.h index a6bc85ed6218..27d2b13b00a1 100644 --- a/include/asm-mips64/checksum.h +++ b/include/asm-mips64/checksum.h @@ -30,12 +30,6 @@ unsigned int csum_partial(const unsigned char *buff, int len, unsigned int sum); * this is a new version of the above that records errors it finds in *errp, * but continues and zeros the rest of the buffer. */ -#define csum_partial_copy_nocheck csum_partial_copy - -/* - * this is a new version of the above that records errors it finds in *errp, - * but continues and zeros the rest of the buffer. - */ unsigned int csum_partial_copy_from_user(const char *src, char *dst, int len, unsigned int sum, int *errp); @@ -60,11 +54,9 @@ extern inline unsigned int csum_and_copy_to_user (const char *src, char *dst, /* * the same as csum_partial, but copies from user space (but on MIPS * we have just one address space, so this is identical to the above) - * - * this is obsolete and will go away. */ -unsigned int csum_partial_copy(const char *src, char *dst, int len, - unsigned int sum); +unsigned int csum_partial_copy_nocheck(const char *src, char *dst, int len, + unsigned int sum); /* * Fold a partial checksum without adding pseudo headers diff --git a/include/asm-parisc/checksum.h b/include/asm-parisc/checksum.h index 4457142807ae..ed8d0ee204da 100644 --- a/include/asm-parisc/checksum.h +++ b/include/asm-parisc/checksum.h @@ -21,10 +21,8 @@ extern unsigned int csum_partial(const unsigned char *, int, unsigned int); * * here even more important to align src and dst on a 32-bit (or even * better 64-bit) boundary - * - * this will go away soon. */ -extern unsigned int csum_partial_copy(const char *, char *, int, unsigned int); +extern unsigned int csum_partial_copy_nocheck(const char *, char *, int, unsigned int); /* * this is a new version of the above that records errors it finds in *errp, @@ -33,20 +31,6 @@ extern unsigned int csum_partial_copy(const char *, char *, int, unsigned int); unsigned int csum_partial_copy_from_user(const char *src, char *dst, int len, unsigned int sum, int *errp); /* - * Note: when you get a NULL pointer exception here this means someone - * passed in an incorrect kernel address to one of these functions. - * - * If you use these functions directly please don't forget the - * verify_area(). - */ -extern __inline__ -unsigned int csum_partial_copy_nocheck (const char *src, char *dst, - int len, int sum) -{ - return csum_partial_copy (src, dst, len, sum); -} - -/* * Optimized for IP headers, which always checksum on 4 octet boundaries. * * Written by Randolph Chung <tausq@debian.org> diff --git a/include/asm-ppc/checksum.h b/include/asm-ppc/checksum.h index eed4bb3ea31a..1516be990218 100644 --- a/include/asm-ppc/checksum.h +++ b/include/asm-ppc/checksum.h @@ -38,13 +38,6 @@ extern unsigned int csum_partial_copy_generic(const char *src, char *dst, /* FIXME: this needs to be written to really do no check -- Cort */ #define csum_partial_copy_nocheck(src, dst, len, sum) \ csum_partial_copy_generic((src), (dst), (len), (sum), 0, 0) -/* - * Old version which ignore errors. - * it will go away soon. - */ -#define csum_partial_copy(src, dst, len, sum) \ - csum_partial_copy_generic((src), (dst), (len), (sum), 0, 0) - /* * turns a 32-bit partial checksum (e.g. from csum_partial) into a diff --git a/include/asm-ppc64/checksum.h b/include/asm-ppc64/checksum.h index cd68aa49b844..5ae7cdbe8ba8 100644 --- a/include/asm-ppc64/checksum.h +++ b/include/asm-ppc64/checksum.h @@ -43,12 +43,7 @@ extern unsigned int csum_partial(const unsigned char * buff, int len, /* * the same as csum_partial, but copies from src to dst while it * checksums - * - * csum_partial_copy will go away soon. */ -unsigned int csum_partial_copy(const char *src, char *dst, - int len, unsigned int sum); - extern unsigned int csum_partial_copy_generic(const char *src, char *dst, int len, unsigned int sum, int *src_err, int *dst_err); diff --git a/include/asm-s390/checksum.h b/include/asm-s390/checksum.h index b264285402bf..a100cccb011e 100644 --- a/include/asm-s390/checksum.h +++ b/include/asm-s390/checksum.h @@ -62,23 +62,6 @@ csum_partial_inline(const unsigned char * buff, int len, unsigned int sum) } /* - * the same as csum_partial, but copies from src while it - * checksums - * - * here even more important to align src and dst on a 32-bit (or even - * better 64-bit) boundary - * - * this will go away soon. - */ - -static inline unsigned int -csum_partial_copy(const char *src, char *dst, int len,unsigned int sum) -{ - memcpy(dst,src,len); - return csum_partial_inline(dst, len, sum); -} - -/* * the same as csum_partial_copy, but copies from user space. * * here even more important to align src and dst on a 32-bit (or even diff --git a/include/asm-s390x/checksum.h b/include/asm-s390x/checksum.h index 06ec7dded453..d6774b735b7b 100644 --- a/include/asm-s390x/checksum.h +++ b/include/asm-s390x/checksum.h @@ -64,23 +64,6 @@ csum_partial_inline(const unsigned char * buff, int len, unsigned int sum) } /* - * the same as csum_partial, but copies from src while it - * checksums - * - * here even more important to align src and dst on a 32-bit (or even - * better 64-bit) boundary - * - * this will go away soon. - */ - -static inline unsigned int -csum_partial_copy(const char *src, char *dst, int len,unsigned int sum) -{ - memcpy(dst,src,len); - return csum_partial_inline(dst, len, sum); -} - -/* * the same as csum_partial_copy, but copies from user space. * * here even more important to align src and dst on a 32-bit (or even diff --git a/include/asm-sh/checksum.h b/include/asm-sh/checksum.h index 3674b28ff024..5b96a7771934 100644 --- a/include/asm-sh/checksum.h +++ b/include/asm-sh/checksum.h @@ -58,14 +58,6 @@ unsigned int csum_partial_copy_from_user ( const char *src, char *dst, } /* - * This is the old (and unsafe) way of doing checksums, a warning message will - * be printed if it is used and an exeption occurs. - * - * this function should go away after some time. - */ -unsigned int csum_partial_copy( const char *src, char *dst, int len, int sum); - -/* * Fold a partial checksum */ diff --git a/include/asm-sparc/checksum.h b/include/asm-sparc/checksum.h index b3e04d4e6da1..eb027804f829 100644 --- a/include/asm-sparc/checksum.h +++ b/include/asm-sparc/checksum.h @@ -40,10 +40,6 @@ extern unsigned int csum_partial(const unsigned char * buff, int len, unsigned i * better 64-bit) boundary */ -/* FIXME: Remove this macro ASAP */ -#define csum_partial_copy(src, dst, len, sum) \ - csum_partial_copy_nocheck(src,dst,len,sum) - extern unsigned int __csum_partial_copy_sparc_generic (const char *, char *); extern __inline__ unsigned int |
