x86: move __addr_ok to uaccess.h.
authorGlauber Costa <gcosta@redhat.com>
Wed, 25 Jun 2008 14:08:51 +0000 (11:08 -0300)
committerIngo Molnar <mingo@elte.hu>
Wed, 9 Jul 2008 07:14:19 +0000 (09:14 +0200)
Take it out of uaccess_32.h. Since it seems that no users
of the x86_64 exists, we simply pick the i386 version.

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
include/asm-x86/uaccess.h
include/asm-x86/uaccess_32.h
include/asm-x86/uaccess_64.h

index 8cb580c0b411d54a611a078be747169ba790e9a6..8a1e45fdc980068d695ac1ec9d760bdbdc92ee88 100644 (file)
 
 #define segment_eq(a, b)       ((a).seg == (b).seg)
 
+#define __addr_ok(addr)                                        \
+       ((unsigned long __force)(addr) <                \
+        (current_thread_info()->addr_limit.seg))
+
 /*
  * Test whether a block of memory is a valid user space address.
  * Returns 0 if the range is valid, nonzero otherwise.
index 3cc323694438dd06a91a59e4bb5bb3b5a8dff321..87b1aede9d4b0049914550db5ef9bee8c0e90ad6 100644 (file)
@@ -20,10 +20,6 @@ extern struct movsl_mask {
 } ____cacheline_aligned_in_smp movsl_mask;
 #endif
 
-#define __addr_ok(addr)                                        \
-       ((unsigned long __force)(addr) <                \
-        (current_thread_info()->addr_limit.seg))
-
 extern void __put_user_bad(void);
 
 /*
index 4a44b906e4c3133b9a8a52d6669ae8cba33692a6..81308763a4c13f28636436092e1ef0e49561dcc4 100644 (file)
@@ -9,9 +9,6 @@
 #include <linux/prefetch.h>
 #include <asm/page.h>
 
-#define __addr_ok(addr) (!((unsigned long)(addr) &                     \
-                          (current_thread_info()->addr_limit.seg)))
-
 #define ARCH_HAS_SEARCH_EXTABLE
 
 extern void __put_user_1(void);