iop-adma: fixup some kzalloc/memset confusions
[cascardo/linux.git] / include / asm-m68knommu / uaccess.h
index 62b29b1..68bbe9b 100644 (file)
 
 #define access_ok(type,addr,size)      _access_ok((unsigned long)(addr),(size))
 
+/*
+ * It is not enough to just have access_ok check for a real RAM address.
+ * This would disallow the case of code/ro-data running XIP in flash/rom.
+ * Ideally we would check the possible flash ranges too, but that is
+ * currently not so easy.
+ */
 static inline int _access_ok(unsigned long addr, unsigned long size)
 {
-       extern unsigned long memory_start, memory_end;
-
-       return (((addr >= memory_start) && (addr+size < memory_end)) ||
-               (is_in_rom(addr) && is_in_rom(addr+size)));
+       return 1;
 }
 
 /*
@@ -167,10 +170,12 @@ static inline long strnlen_user(const char *src, long n)
  */
 
 static inline unsigned long
-clear_user(void *to, unsigned long n)
+__clear_user(void *to, unsigned long n)
 {
        memset(to, 0, n);
        return 0;
 }
 
+#define        clear_user(to,n)        __clear_user(to,n)
+
 #endif /* _M68KNOMMU_UACCESS_H */