diff options
-rw-r--r-- | arch/powerpc/lib/Makefile | 4 | ||||
-rw-r--r-- | arch/ppc64/lib/Makefile | 1 | ||||
-rw-r--r-- | arch/ppc64/lib/usercopy.c | 41 |
3 files changed, 2 insertions, 44 deletions
diff --git a/arch/powerpc/lib/Makefile b/arch/powerpc/lib/Makefile index 0726235ef25d..15b6b2696500 100644 --- a/arch/powerpc/lib/Makefile +++ b/arch/powerpc/lib/Makefile | |||
@@ -4,13 +4,13 @@ | |||
4 | 4 | ||
5 | ifeq ($(CONFIG_PPC_MERGE),y) | 5 | ifeq ($(CONFIG_PPC_MERGE),y) |
6 | obj-y := string.o | 6 | obj-y := string.o |
7 | obj-$(CONFIG_PPC64) += usercopy_64.o mem_64.o | 7 | obj-$(CONFIG_PPC64) += mem_64.o |
8 | endif | 8 | endif |
9 | 9 | ||
10 | obj-y += strcase.o | 10 | obj-y += strcase.o |
11 | obj-$(CONFIG_PPC32) += div64.o copy_32.o checksum_32.o | 11 | obj-$(CONFIG_PPC32) += div64.o copy_32.o checksum_32.o |
12 | obj-$(CONFIG_PPC64) += checksum_64.o copypage_64.o copyuser_64.o \ | 12 | obj-$(CONFIG_PPC64) += checksum_64.o copypage_64.o copyuser_64.o \ |
13 | memcpy_64.o | 13 | memcpy_64.o usercopy_64.o |
14 | obj-$(CONFIG_PPC_ISERIES) += e2a.o | 14 | obj-$(CONFIG_PPC_ISERIES) += e2a.o |
15 | ifeq ($(CONFIG_PPC64),y) | 15 | ifeq ($(CONFIG_PPC64),y) |
16 | obj-$(CONFIG_SMP) += locks.o | 16 | obj-$(CONFIG_SMP) += locks.o |
diff --git a/arch/ppc64/lib/Makefile b/arch/ppc64/lib/Makefile index f4732c5ffd5f..42d5295bf345 100644 --- a/arch/ppc64/lib/Makefile +++ b/arch/ppc64/lib/Makefile | |||
@@ -3,4 +3,3 @@ | |||
3 | # | 3 | # |
4 | 4 | ||
5 | lib-y := string.o | 5 | lib-y := string.o |
6 | lib-y += usercopy.o | ||
diff --git a/arch/ppc64/lib/usercopy.c b/arch/ppc64/lib/usercopy.c deleted file mode 100644 index 5eea6f3c1e03..000000000000 --- a/arch/ppc64/lib/usercopy.c +++ /dev/null | |||
@@ -1,41 +0,0 @@ | |||
1 | /* | ||
2 | * Functions which are too large to be inlined. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation; either version | ||
7 | * 2 of the License, or (at your option) any later version. | ||
8 | */ | ||
9 | #include <linux/module.h> | ||
10 | #include <asm/uaccess.h> | ||
11 | |||
12 | unsigned long copy_from_user(void *to, const void __user *from, unsigned long n) | ||
13 | { | ||
14 | if (likely(access_ok(VERIFY_READ, from, n))) | ||
15 | n = __copy_from_user(to, from, n); | ||
16 | else | ||
17 | memset(to, 0, n); | ||
18 | return n; | ||
19 | } | ||
20 | |||
21 | unsigned long copy_to_user(void __user *to, const void *from, unsigned long n) | ||
22 | { | ||
23 | if (likely(access_ok(VERIFY_WRITE, to, n))) | ||
24 | n = __copy_to_user(to, from, n); | ||
25 | return n; | ||
26 | } | ||
27 | |||
28 | unsigned long copy_in_user(void __user *to, const void __user *from, | ||
29 | unsigned long n) | ||
30 | { | ||
31 | might_sleep(); | ||
32 | if (likely(access_ok(VERIFY_READ, from, n) && | ||
33 | access_ok(VERIFY_WRITE, to, n))) | ||
34 | n =__copy_tofrom_user(to, from, n); | ||
35 | return n; | ||
36 | } | ||
37 | |||
38 | EXPORT_SYMBOL(copy_from_user); | ||
39 | EXPORT_SYMBOL(copy_to_user); | ||
40 | EXPORT_SYMBOL(copy_in_user); | ||
41 | |||