]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - include/asm-m32r/uaccess.h
Merge branch 'linus' into core/softirq
[mv-sheeva.git] / include / asm-m32r / uaccess.h
index 26e978c7e3b40a060c0d3e80f1ef41cf5923635a..1c7047bea2002b013ab779a8c752654b9a2a9c23 100644 (file)
@@ -14,6 +14,7 @@
 #include <linux/errno.h>
 #include <linux/thread_info.h>
 #include <asm/page.h>
+#include <asm/setup.h>
 
 #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));