]> err.no Git - linux-2.6/blobdiff - include/asm-m32r/uaccess.h
ata_piix: add TECRA M4 to broken suspend list
[linux-2.6] / include / asm-m32r / uaccess.h
index 819cc28a94f7c430e977064ccd84f2052406795e..1c7047bea2002b013ab779a8c752654b9a2a9c23 100644 (file)
 /*
  * User space memory access functions
  */
-#include <linux/config.h>
 #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
@@ -69,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"               \
@@ -77,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" );                                             \
@@ -107,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));