aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/lib/Makefile4
-rw-r--r--arch/ppc64/lib/Makefile1
-rw-r--r--arch/ppc64/lib/usercopy.c41
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
5ifeq ($(CONFIG_PPC_MERGE),y) 5ifeq ($(CONFIG_PPC_MERGE),y)
6obj-y := string.o 6obj-y := string.o
7obj-$(CONFIG_PPC64) += usercopy_64.o mem_64.o 7obj-$(CONFIG_PPC64) += mem_64.o
8endif 8endif
9 9
10obj-y += strcase.o 10obj-y += strcase.o
11obj-$(CONFIG_PPC32) += div64.o copy_32.o checksum_32.o 11obj-$(CONFIG_PPC32) += div64.o copy_32.o checksum_32.o
12obj-$(CONFIG_PPC64) += checksum_64.o copypage_64.o copyuser_64.o \ 12obj-$(CONFIG_PPC64) += checksum_64.o copypage_64.o copyuser_64.o \
13 memcpy_64.o 13 memcpy_64.o usercopy_64.o
14obj-$(CONFIG_PPC_ISERIES) += e2a.o 14obj-$(CONFIG_PPC_ISERIES) += e2a.o
15ifeq ($(CONFIG_PPC64),y) 15ifeq ($(CONFIG_PPC64),y)
16obj-$(CONFIG_SMP) += locks.o 16obj-$(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
5lib-y := string.o 5lib-y := string.o
6lib-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
12unsigned 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
21unsigned 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
28unsigned 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
38EXPORT_SYMBOL(copy_from_user);
39EXPORT_SYMBOL(copy_to_user);
40EXPORT_SYMBOL(copy_in_user);
41