aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2017-03-28 01:37:07 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2017-03-28 18:24:04 -0400
commit2ef59f28567f8a5d66dccc0e6a99a1bd655fd605 (patch)
treefba9febbc2705f8f18e410f0f6018845a04f0fd2
parentd597580d373774b1bdab84b3d26ff0b55162b916 (diff)
unicore32: get rid of zeroing and switch to RAW_COPY_USER
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--arch/unicore32/Kconfig1
-rw-r--r--arch/unicore32/include/asm/uaccess.h6
-rw-r--r--arch/unicore32/kernel/ksyms.c4
-rw-r--r--arch/unicore32/lib/copy_from_user.S16
-rw-r--r--arch/unicore32/lib/copy_to_user.S6
5 files changed, 16 insertions, 17 deletions
diff --git a/arch/unicore32/Kconfig b/arch/unicore32/Kconfig
index 0769066929c6..319519eaed24 100644
--- a/arch/unicore32/Kconfig
+++ b/arch/unicore32/Kconfig
@@ -18,6 +18,7 @@ config UNICORE32
18 select ARCH_WANT_FRAME_POINTERS 18 select ARCH_WANT_FRAME_POINTERS
19 select GENERIC_IOMAP 19 select GENERIC_IOMAP
20 select MODULES_USE_ELF_REL 20 select MODULES_USE_ELF_REL
21 select ARCH_HAS_RAW_COPY_USER
21 help 22 help
22 UniCore-32 is 32-bit Instruction Set Architecture, 23 UniCore-32 is 32-bit Instruction Set Architecture,
23 including a series of low-power-consumption RISC chip 24 including a series of low-power-consumption RISC chip
diff --git a/arch/unicore32/include/asm/uaccess.h b/arch/unicore32/include/asm/uaccess.h
index b2bcab69dfee..1d55f2f83759 100644
--- a/arch/unicore32/include/asm/uaccess.h
+++ b/arch/unicore32/include/asm/uaccess.h
@@ -24,15 +24,17 @@
24#define __access_ok(addr, size) (__kernel_ok || __user_ok((addr), (size))) 24#define __access_ok(addr, size) (__kernel_ok || __user_ok((addr), (size)))
25 25
26extern unsigned long __must_check 26extern unsigned long __must_check
27__copy_from_user(void *to, const void __user *from, unsigned long n); 27raw_copy_from_user(void *to, const void __user *from, unsigned long n);
28extern unsigned long __must_check 28extern unsigned long __must_check
29__copy_to_user(void __user *to, const void *from, unsigned long n); 29raw_copy_to_user(void __user *to, const void *from, unsigned long n);
30extern unsigned long __must_check 30extern unsigned long __must_check
31__clear_user(void __user *addr, unsigned long n); 31__clear_user(void __user *addr, unsigned long n);
32extern unsigned long __must_check 32extern unsigned long __must_check
33__strncpy_from_user(char *to, const char __user *from, unsigned long count); 33__strncpy_from_user(char *to, const char __user *from, unsigned long count);
34extern unsigned long 34extern unsigned long
35__strnlen_user(const char __user *s, long n); 35__strnlen_user(const char __user *s, long n);
36#define INLINE_COPY_FROM_USER
37#define INLINE_COPY_TO_USER
36 38
37#include <asm-generic/uaccess.h> 39#include <asm-generic/uaccess.h>
38 40
diff --git a/arch/unicore32/kernel/ksyms.c b/arch/unicore32/kernel/ksyms.c
index 0323528a80fd..dcc72ee1fcdb 100644
--- a/arch/unicore32/kernel/ksyms.c
+++ b/arch/unicore32/kernel/ksyms.c
@@ -46,8 +46,8 @@ EXPORT_SYMBOL(__strncpy_from_user);
46 46
47EXPORT_SYMBOL(copy_page); 47EXPORT_SYMBOL(copy_page);
48 48
49EXPORT_SYMBOL(__copy_from_user); 49EXPORT_SYMBOL(raw_copy_from_user);
50EXPORT_SYMBOL(__copy_to_user); 50EXPORT_SYMBOL(raw_copy_to_user);
51EXPORT_SYMBOL(__clear_user); 51EXPORT_SYMBOL(__clear_user);
52 52
53EXPORT_SYMBOL(__ashldi3); 53EXPORT_SYMBOL(__ashldi3);
diff --git a/arch/unicore32/lib/copy_from_user.S b/arch/unicore32/lib/copy_from_user.S
index ab0767ea5dbd..5f80fcbe8631 100644
--- a/arch/unicore32/lib/copy_from_user.S
+++ b/arch/unicore32/lib/copy_from_user.S
@@ -16,7 +16,7 @@
16/* 16/*
17 * Prototype: 17 * Prototype:
18 * 18 *
19 * size_t __copy_from_user(void *to, const void *from, size_t n) 19 * size_t raw_copy_from_user(void *to, const void *from, size_t n)
20 * 20 *
21 * Purpose: 21 * Purpose:
22 * 22 *
@@ -87,22 +87,18 @@
87 87
88 .text 88 .text
89 89
90ENTRY(__copy_from_user) 90ENTRY(raw_copy_from_user)
91 91
92#include "copy_template.S" 92#include "copy_template.S"
93 93
94ENDPROC(__copy_from_user) 94ENDPROC(raw_copy_from_user)
95 95
96 .pushsection .fixup,"ax" 96 .pushsection .fixup,"ax"
97 .align 0 97 .align 0
98 copy_abort_preamble 98 copy_abort_preamble
99 ldm.w (r1, r2), [sp]+ 99 ldm.w (r1, r2, r3), [sp]+
100 sub r3, r0, r1 100 sub r0, r0, r1
101 rsub r2, r3, r2 101 rsub r0, r0, r2
102 stw r2, [sp]
103 mov r1, #0
104 b.l memset
105 ldw.w r0, [sp]+, #4
106 copy_abort_end 102 copy_abort_end
107 .popsection 103 .popsection
108 104
diff --git a/arch/unicore32/lib/copy_to_user.S b/arch/unicore32/lib/copy_to_user.S
index 6e22151c840d..857c6816ffe7 100644
--- a/arch/unicore32/lib/copy_to_user.S
+++ b/arch/unicore32/lib/copy_to_user.S
@@ -16,7 +16,7 @@
16/* 16/*
17 * Prototype: 17 * Prototype:
18 * 18 *
19 * size_t __copy_to_user(void *to, const void *from, size_t n) 19 * size_t raw_copy_to_user(void *to, const void *from, size_t n)
20 * 20 *
21 * Purpose: 21 * Purpose:
22 * 22 *
@@ -79,11 +79,11 @@
79 79
80 .text 80 .text
81 81
82WEAK(__copy_to_user) 82WEAK(raw_copy_to_user)
83 83
84#include "copy_template.S" 84#include "copy_template.S"
85 85
86ENDPROC(__copy_to_user) 86ENDPROC(raw_copy_to_user)
87 87
88 .pushsection .fixup,"ax" 88 .pushsection .fixup,"ax"
89 .align 0 89 .align 0