X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=include%2Fasm-m32r%2Fuaccess.h;h=1c7047bea2002b013ab779a8c752654b9a2a9c23;hb=9583f3d9c00974911daf227cbaa12d6c1caaabad;hp=26e978c7e3b40a060c0d3e80f1ef41cf5923635a;hpb=075395d228641646159dae3dd170fa3fc6ff477a;p=mv-sheeva.git diff --git a/include/asm-m32r/uaccess.h b/include/asm-m32r/uaccess.h index 26e978c7e3b..1c7047bea20 100644 --- a/include/asm-m32r/uaccess.h +++ b/include/asm-m32r/uaccess.h @@ -14,6 +14,7 @@ #include #include #include +#include #define VERIFY_READ 0 #define VERIFY_WRITE 1 @@ -68,7 +69,7 @@ static inline void set_fs(mm_segment_t s) * This needs 33-bit arithmetic. We have a carry... */ #define __range_ok(addr,size) ({ \ - unsigned long flag, sum; \ + unsigned long flag, roksum; \ __chk_user_ptr(addr); \ asm ( \ " cmpu %1, %1 ; clear cbit\n" \ @@ -76,7 +77,7 @@ static inline void set_fs(mm_segment_t s) " subx %0, %0\n" \ " cmpu %4, %1\n" \ " subx %0, %5\n" \ - : "=&r" (flag), "=r" (sum) \ + : "=&r" (flag), "=r" (roksum) \ : "1" (addr), "r" ((int)(size)), \ "r" (current_thread_info()->addr_limit.seg), "r" (0) \ : "cbit" ); \ @@ -106,7 +107,6 @@ static inline void set_fs(mm_segment_t s) #else static inline int access_ok(int type, const void *addr, unsigned long size) { - extern unsigned long memory_start, memory_end; unsigned long val = (unsigned long)addr; return ((val >= memory_start) && ((val + size) < memory_end));