diff options
Diffstat (limited to 'arch/sh/mm/pg-nommu.c')
-rw-r--r-- | arch/sh/mm/pg-nommu.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/arch/sh/mm/pg-nommu.c b/arch/sh/mm/pg-nommu.c index 8f9165a4e333..d15221beaa16 100644 --- a/arch/sh/mm/pg-nommu.c +++ b/arch/sh/mm/pg-nommu.c | |||
@@ -14,23 +14,24 @@ | |||
14 | #include <linux/string.h> | 14 | #include <linux/string.h> |
15 | #include <asm/page.h> | 15 | #include <asm/page.h> |
16 | 16 | ||
17 | static void copy_page_nommu(void *to, void *from) | 17 | void copy_page_nommu(void *to, void *from) |
18 | { | 18 | { |
19 | memcpy(to, from, PAGE_SIZE); | 19 | memcpy(to, from, PAGE_SIZE); |
20 | } | 20 | } |
21 | 21 | ||
22 | static void clear_page_nommu(void *to) | 22 | void clear_page_nommu(void *to) |
23 | { | 23 | { |
24 | memset(to, 0, PAGE_SIZE); | 24 | memset(to, 0, PAGE_SIZE); |
25 | } | 25 | } |
26 | 26 | ||
27 | static int __init pg_nommu_init(void) | 27 | __kernel_size_t __copy_user(void *to, const void *from, __kernel_size_t n) |
28 | { | 28 | { |
29 | copy_page = copy_page_nommu; | 29 | memcpy(to, from, n); |
30 | clear_page = clear_page_nommu; | ||
31 | |||
32 | return 0; | 30 | return 0; |
33 | } | 31 | } |
34 | 32 | ||
35 | subsys_initcall(pg_nommu_init); | 33 | __kernel_size_t __clear_user(void *to, __kernel_size_t n) |
36 | 34 | { | |
35 | memset(to, 0, n); | ||
36 | return 0; | ||
37 | } | ||