-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PATCH] uml: s390 preparation, checksumming done in arch code
Checksum handling largely depends on the subarch. Thus, I renamed i386 arch_csum_partial in arch/um/sys-i386/checksum.S back to csum_partial, removed csum_partial from arch/um/kernel/checksum.c and shifted EXPORT_SYMBOL(csum_partial) to arch/um/sys-i386/ksyms.c. Then, csum_partial_copy_to and csum_partial_copy_from were shifted from arch/um/kernel/checksum.c to arch/um/include/sysdep-i386/checksum.h and inserted in the calling functions csum_partial_copy_from_user() and csum_and_copy_to_user(). Now, arch/um/kernel/checksum.c is empty and removed. Signed-off-by: Bodo Stroesser <bstroesser@fujitsu-siemens.com> Signed-off-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
- Loading branch information
Bodo Stroesser
authored and
Linus Torvalds
committed
May 5, 2005
1 parent
c52ac04
commit 7d37c6d
Showing
5 changed files
with
27 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +0,0 @@ | ||
#include "asm/uaccess.h" | ||
#include "linux/errno.h" | ||
#include "linux/module.h" | ||
|
||
unsigned int arch_csum_partial(const unsigned char *buff, int len, int sum); | ||
|
||
unsigned int csum_partial(unsigned char *buff, int len, int sum) | ||
{ | ||
return arch_csum_partial(buff, len, sum); | ||
} | ||
|
||
EXPORT_SYMBOL(csum_partial); | ||
|
||
unsigned int csum_partial_copy_to(const unsigned char *src, | ||
unsigned char __user *dst, int len, int sum, | ||
int *err_ptr) | ||
{ | ||
if(copy_to_user(dst, src, len)){ | ||
*err_ptr = -EFAULT; | ||
return(-1); | ||
} | ||
|
||
return(arch_csum_partial(src, len, sum)); | ||
} | ||
|
||
unsigned int csum_partial_copy_from(const unsigned char __user *src, | ||
unsigned char *dst, int len, int sum, | ||
int *err_ptr) | ||
{ | ||
if(copy_from_user(dst, src, len)){ | ||
*err_ptr = -EFAULT; | ||
return(-1); | ||
} | ||
|
||
return arch_csum_partial(dst, len, sum); | ||
} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters