aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/kernel
diff options
context:
space:
mode:
authorBodo Stroesser <bstroesser@fujitsu-siemens.com>2005-05-05 19:15:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-05 19:36:38 -0400
commit7d37c6d52fce13008f20344790a81a6a5a0003b3 (patch)
treeebf98bc32d8c0e29627f7be8a4dd349a32efff1d /arch/um/kernel
parentc52ac046757deebc514483e407dca39a9c774aa3 (diff)
[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>
Diffstat (limited to 'arch/um/kernel')
-rw-r--r--arch/um/kernel/Makefile2
-rw-r--r--arch/um/kernel/checksum.c36
2 files changed, 1 insertions, 37 deletions
diff --git a/arch/um/kernel/Makefile b/arch/um/kernel/Makefile
index 9d2c261b898d..dca654263857 100644
--- a/arch/um/kernel/Makefile
+++ b/arch/um/kernel/Makefile
@@ -6,7 +6,7 @@
6extra-y := vmlinux.lds 6extra-y := vmlinux.lds
7clean-files := 7clean-files :=
8 8
9obj-y = checksum.o config.o exec_kern.o exitcode.o \ 9obj-y = config.o exec_kern.o exitcode.o \
10 helper.o init_task.o irq.o irq_user.o ksyms.o main.o mem.o mem_user.o \ 10 helper.o init_task.o irq.o irq_user.o ksyms.o main.o mem.o mem_user.o \
11 physmem.o process.o process_kern.o ptrace.o reboot.o resource.o \ 11 physmem.o process.o process_kern.o ptrace.o reboot.o resource.o \
12 sigio_user.o sigio_kern.o signal_kern.o signal_user.o smp.o \ 12 sigio_user.o sigio_kern.o signal_kern.o signal_user.o smp.o \
diff --git a/arch/um/kernel/checksum.c b/arch/um/kernel/checksum.c
index e69b2be951d1..e69de29bb2d1 100644
--- a/arch/um/kernel/checksum.c
+++ b/arch/um/kernel/checksum.c
@@ -1,36 +0,0 @@
1#include "asm/uaccess.h"
2#include "linux/errno.h"
3#include "linux/module.h"
4
5unsigned int arch_csum_partial(const unsigned char *buff, int len, int sum);
6
7unsigned int csum_partial(unsigned char *buff, int len, int sum)
8{
9 return arch_csum_partial(buff, len, sum);
10}
11
12EXPORT_SYMBOL(csum_partial);
13
14unsigned int csum_partial_copy_to(const unsigned char *src,
15 unsigned char __user *dst, int len, int sum,
16 int *err_ptr)
17{
18 if(copy_to_user(dst, src, len)){
19 *err_ptr = -EFAULT;
20 return(-1);
21 }
22
23 return(arch_csum_partial(src, len, sum));
24}
25
26unsigned int csum_partial_copy_from(const unsigned char __user *src,
27 unsigned char *dst, int len, int sum,
28 int *err_ptr)
29{
30 if(copy_from_user(dst, src, len)){
31 *err_ptr = -EFAULT;
32 return(-1);
33 }
34
35 return arch_csum_partial(dst, len, sum);
36}