aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlauber Costa <gcosta@redhat.com>2008-06-25 10:08:51 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-09 03:14:19 -0400
commit002ca1690c3d0a495e6aedd608281aeb01ce6385 (patch)
treeb44eacf9cb730b3a3f47e0f3848fac43f68af97e
parent865e5b76505cdade261773bde32f785b3ce579f1 (diff)
x86: move __addr_ok to uaccess.h.
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>
-rw-r--r--include/asm-x86/uaccess.h4
-rw-r--r--include/asm-x86/uaccess_32.h4
-rw-r--r--include/asm-x86/uaccess_64.h3
3 files changed, 4 insertions, 7 deletions
diff --git a/include/asm-x86/uaccess.h b/include/asm-x86/uaccess.h
index 8cb580c0b411..8a1e45fdc980 100644
--- a/include/asm-x86/uaccess.h
+++ b/include/asm-x86/uaccess.h
@@ -33,6 +33,10 @@
33 33
34#define segment_eq(a, b) ((a).seg == (b).seg) 34#define segment_eq(a, b) ((a).seg == (b).seg)
35 35
36#define __addr_ok(addr) \
37 ((unsigned long __force)(addr) < \
38 (current_thread_info()->addr_limit.seg))
39
36/* 40/*
37 * Test whether a block of memory is a valid user space address. 41 * Test whether a block of memory is a valid user space address.
38 * Returns 0 if the range is valid, nonzero otherwise. 42 * Returns 0 if the range is valid, nonzero otherwise.
diff --git a/include/asm-x86/uaccess_32.h b/include/asm-x86/uaccess_32.h
index 3cc323694438..87b1aede9d4b 100644
--- a/include/asm-x86/uaccess_32.h
+++ b/include/asm-x86/uaccess_32.h
@@ -20,10 +20,6 @@ extern struct movsl_mask {
20} ____cacheline_aligned_in_smp movsl_mask; 20} ____cacheline_aligned_in_smp movsl_mask;
21#endif 21#endif
22 22
23#define __addr_ok(addr) \
24 ((unsigned long __force)(addr) < \
25 (current_thread_info()->addr_limit.seg))
26
27extern void __put_user_bad(void); 23extern void __put_user_bad(void);
28 24
29/* 25/*
diff --git a/include/asm-x86/uaccess_64.h b/include/asm-x86/uaccess_64.h
index 4a44b906e4c3..81308763a4c1 100644
--- a/include/asm-x86/uaccess_64.h
+++ b/include/asm-x86/uaccess_64.h
@@ -9,9 +9,6 @@
9#include <linux/prefetch.h> 9#include <linux/prefetch.h>
10#include <asm/page.h> 10#include <asm/page.h>
11 11
12#define __addr_ok(addr) (!((unsigned long)(addr) & \
13 (current_thread_info()->addr_limit.seg)))
14
15#define ARCH_HAS_SEARCH_EXTABLE 12#define ARCH_HAS_SEARCH_EXTABLE
16 13
17extern void __put_user_1(void); 14extern void __put_user_1(void);