X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=include%2Fasm-s390%2Fuaccess.h;h=10a619da4761cddd316266891b26c5f69b86cb43;hb=8f0cb147b2fb12427bf6abef7fed2b604557a41e;hp=3e3bfe6a8fa84188f86f1acef2d17e84814771c3;hpb=3ec8a773d2775db86cc21d28b77bea29c8a1ea3c;p=powerpc.git diff --git a/include/asm-s390/uaccess.h b/include/asm-s390/uaccess.h index 3e3bfe6a8f..10a619da47 100644 --- a/include/asm-s390/uaccess.h +++ b/include/asm-s390/uaccess.h @@ -65,13 +65,6 @@ #define access_ok(type,addr,size) __access_ok(addr,size) -/* this function will go away soon - use access_ok() instead */ -extern inline int __deprecated verify_area(int type, const void __user *addr, - unsigned long size) -{ - return access_ok(type, addr, size) ? 0 : -EFAULT; -} - /* * The exception table consists of pairs of addresses: the first is the * address of an instruction that is allowed to fault, and the second is @@ -207,21 +200,37 @@ extern int __put_user_bad(void) __attribute__((noreturn)); #define __get_user(x, ptr) \ ({ \ - __typeof__(*(ptr)) __x; \ int __gu_err; \ __chk_user_ptr(ptr); \ switch (sizeof(*(ptr))) { \ - case 1: \ - case 2: \ - case 4: \ - case 8: \ + case 1: { \ + unsigned char __x; \ + __get_user_asm(__x, ptr, __gu_err); \ + (x) = (__typeof__(*(ptr))) __x; \ + break; \ + }; \ + case 2: { \ + unsigned short __x; \ + __get_user_asm(__x, ptr, __gu_err); \ + (x) = (__typeof__(*(ptr))) __x; \ + break; \ + }; \ + case 4: { \ + unsigned int __x; \ + __get_user_asm(__x, ptr, __gu_err); \ + (x) = (__typeof__(*(ptr))) __x; \ + break; \ + }; \ + case 8: { \ + unsigned long long __x; \ __get_user_asm(__x, ptr, __gu_err); \ + (x) = (__typeof__(*(ptr))) __x; \ break; \ + }; \ default: \ __get_user_bad(); \ break; \ } \ - (x) = __x; \ __gu_err; \ })