omap_hsmmc: Flush posted write to IRQ
[linux-ginger.git] / arch / sh / include / asm / uaccess_64.h
blob56fd20b8cdcc16db8fbe6da757da62dec0d1d4d9
1 #ifndef __ASM_SH_UACCESS_64_H
2 #define __ASM_SH_UACCESS_64_H
4 /*
5 * include/asm-sh/uaccess_64.h
7 * Copyright (C) 2000, 2001 Paolo Alberelli
8 * Copyright (C) 2003, 2004 Paul Mundt
10 * User space memory access functions
12 * Copyright (C) 1999 Niibe Yutaka
14 * Based on:
15 * MIPS implementation version 1.15 by
16 * Copyright (C) 1996, 1997, 1998 by Ralf Baechle
17 * and i386 version.
19 * This file is subject to the terms and conditions of the GNU General Public
20 * License. See the file "COPYING" in the main directory of this archive
21 * for more details.
24 #define __get_user_size(x,ptr,size,retval) \
25 do { \
26 retval = 0; \
27 switch (size) { \
28 case 1: \
29 retval = __get_user_asm_b((void *)&x, \
30 (long)ptr); \
31 break; \
32 case 2: \
33 retval = __get_user_asm_w((void *)&x, \
34 (long)ptr); \
35 break; \
36 case 4: \
37 retval = __get_user_asm_l((void *)&x, \
38 (long)ptr); \
39 break; \
40 case 8: \
41 retval = __get_user_asm_q((void *)&x, \
42 (long)ptr); \
43 break; \
44 default: \
45 __get_user_unknown(); \
46 break; \
47 } \
48 } while (0)
50 extern long __get_user_asm_b(void *, long);
51 extern long __get_user_asm_w(void *, long);
52 extern long __get_user_asm_l(void *, long);
53 extern long __get_user_asm_q(void *, long);
54 extern void __get_user_unknown(void);
56 #define __put_user_size(x,ptr,size,retval) \
57 do { \
58 retval = 0; \
59 switch (size) { \
60 case 1: \
61 retval = __put_user_asm_b((void *)&x, \
62 (long)ptr); \
63 break; \
64 case 2: \
65 retval = __put_user_asm_w((void *)&x, \
66 (long)ptr); \
67 break; \
68 case 4: \
69 retval = __put_user_asm_l((void *)&x, \
70 (long)ptr); \
71 break; \
72 case 8: \
73 retval = __put_user_asm_q((void *)&x, \
74 (long)ptr); \
75 break; \
76 default: \
77 __put_user_unknown(); \
78 } \
79 } while (0)
81 extern long __put_user_asm_b(void *, long);
82 extern long __put_user_asm_w(void *, long);
83 extern long __put_user_asm_l(void *, long);
84 extern long __put_user_asm_q(void *, long);
85 extern void __put_user_unknown(void);
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);
91 #endif /* __ASM_SH_UACCESS_64_H */