diff options
Diffstat (limited to 'arch/sh/include/asm/uaccess_64.h')
-rw-r--r-- | arch/sh/include/asm/uaccess_64.h | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/arch/sh/include/asm/uaccess_64.h b/arch/sh/include/asm/uaccess_64.h index 5580fd47100..56fd20b8cdc 100644 --- a/arch/sh/include/asm/uaccess_64.h +++ b/arch/sh/include/asm/uaccess_64.h | |||
@@ -26,16 +26,20 @@ do { \ | |||
26 | retval = 0; \ | 26 | retval = 0; \ |
27 | switch (size) { \ | 27 | switch (size) { \ |
28 | case 1: \ | 28 | case 1: \ |
29 | retval = __get_user_asm_b(x, ptr); \ | 29 | retval = __get_user_asm_b((void *)&x, \ |
30 | (long)ptr); \ | ||
30 | break; \ | 31 | break; \ |
31 | case 2: \ | 32 | case 2: \ |
32 | retval = __get_user_asm_w(x, ptr); \ | 33 | retval = __get_user_asm_w((void *)&x, \ |
34 | (long)ptr); \ | ||
33 | break; \ | 35 | break; \ |
34 | case 4: \ | 36 | case 4: \ |
35 | retval = __get_user_asm_l(x, ptr); \ | 37 | retval = __get_user_asm_l((void *)&x, \ |
38 | (long)ptr); \ | ||
36 | break; \ | 39 | break; \ |
37 | case 8: \ | 40 | case 8: \ |
38 | retval = __get_user_asm_q(x, ptr); \ | 41 | retval = __get_user_asm_q((void *)&x, \ |
42 | (long)ptr); \ | ||
39 | break; \ | 43 | break; \ |
40 | default: \ | 44 | default: \ |
41 | __get_user_unknown(); \ | 45 | __get_user_unknown(); \ |
@@ -54,16 +58,20 @@ do { \ | |||
54 | retval = 0; \ | 58 | retval = 0; \ |
55 | switch (size) { \ | 59 | switch (size) { \ |
56 | case 1: \ | 60 | case 1: \ |
57 | retval = __put_user_asm_b(x, ptr); \ | 61 | retval = __put_user_asm_b((void *)&x, \ |
62 | (long)ptr); \ | ||
58 | break; \ | 63 | break; \ |
59 | case 2: \ | 64 | case 2: \ |
60 | retval = __put_user_asm_w(x, ptr); \ | 65 | retval = __put_user_asm_w((void *)&x, \ |
66 | (long)ptr); \ | ||
61 | break; \ | 67 | break; \ |
62 | case 4: \ | 68 | case 4: \ |
63 | retval = __put_user_asm_l(x, ptr); \ | 69 | retval = __put_user_asm_l((void *)&x, \ |
70 | (long)ptr); \ | ||
64 | break; \ | 71 | break; \ |
65 | case 8: \ | 72 | case 8: \ |
66 | retval = __put_user_asm_q(x, ptr); \ | 73 | retval = __put_user_asm_q((void *)&x, \ |
74 | (long)ptr); \ | ||
67 | break; \ | 75 | break; \ |
68 | default: \ | 76 | default: \ |
69 | __put_user_unknown(); \ | 77 | __put_user_unknown(); \ |
@@ -77,5 +85,7 @@ extern long __put_user_asm_q(void *, long); | |||
77 | extern void __put_user_unknown(void); | 85 | extern void __put_user_unknown(void); |
78 | 86 | ||
79 | extern long __strnlen_user(const char *__s, long __n); | 87 | extern long __strnlen_user(const char *__s, long __n); |
88 | extern int __strncpy_from_user(unsigned long __dest, | ||
89 | unsigned long __user __src, int __count); | ||
80 | 90 | ||
81 | #endif /* __ASM_SH_UACCESS_64_H */ | 91 | #endif /* __ASM_SH_UACCESS_64_H */ |