aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-s390/uaccess.h
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-11-07 22:51:47 -0500
committerJeff Garzik <jgarzik@pobox.com>2005-11-07 22:51:47 -0500
commit6b995751c2e851d2bc9c277b5884d0adb519e31d (patch)
tree7a15b41b5d8ce612915584a0773c670d5c0ab5b8 /include/asm-s390/uaccess.h
parent6c2f4267833f453156f8f439cc32eb4c92f357b4 (diff)
parentd27ba47e7e8c466c18983a1779d611f82d6a354f (diff)
Merge branch 'master'
Diffstat (limited to 'include/asm-s390/uaccess.h')
-rw-r--r--include/asm-s390/uaccess.h28
1 files changed, 22 insertions, 6 deletions
diff --git a/include/asm-s390/uaccess.h b/include/asm-s390/uaccess.h
index 38a5cf8ab9e3..10a619da4761 100644
--- a/include/asm-s390/uaccess.h
+++ b/include/asm-s390/uaccess.h
@@ -200,21 +200,37 @@ extern int __put_user_bad(void) __attribute__((noreturn));
200 200
201#define __get_user(x, ptr) \ 201#define __get_user(x, ptr) \
202({ \ 202({ \
203 __typeof__(*(ptr)) __x; \
204 int __gu_err; \ 203 int __gu_err; \
205 __chk_user_ptr(ptr); \ 204 __chk_user_ptr(ptr); \
206 switch (sizeof(*(ptr))) { \ 205 switch (sizeof(*(ptr))) { \
207 case 1: \ 206 case 1: { \
208 case 2: \ 207 unsigned char __x; \
209 case 4: \ 208 __get_user_asm(__x, ptr, __gu_err); \
210 case 8: \ 209 (x) = (__typeof__(*(ptr))) __x; \
210 break; \
211 }; \
212 case 2: { \
213 unsigned short __x; \
214 __get_user_asm(__x, ptr, __gu_err); \
215 (x) = (__typeof__(*(ptr))) __x; \
216 break; \
217 }; \
218 case 4: { \
219 unsigned int __x; \
220 __get_user_asm(__x, ptr, __gu_err); \
221 (x) = (__typeof__(*(ptr))) __x; \
222 break; \
223 }; \
224 case 8: { \
225 unsigned long long __x; \
211 __get_user_asm(__x, ptr, __gu_err); \ 226 __get_user_asm(__x, ptr, __gu_err); \
227 (x) = (__typeof__(*(ptr))) __x; \
212 break; \ 228 break; \
229 }; \
213 default: \ 230 default: \
214 __get_user_bad(); \ 231 __get_user_bad(); \
215 break; \ 232 break; \
216 } \ 233 } \
217 (x) = __x; \
218 __gu_err; \ 234 __gu_err; \
219}) 235})
220 236