Commit 002ca169 authored by Glauber Costa's avatar Glauber Costa Committed by Ingo Molnar

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: default avatarGlauber Costa <gcosta@redhat.com>
Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 865e5b76
...@@ -33,6 +33,10 @@ ...@@ -33,6 +33,10 @@
#define segment_eq(a, b) ((a).seg == (b).seg) #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. * Test whether a block of memory is a valid user space address.
* Returns 0 if the range is valid, nonzero otherwise. * Returns 0 if the range is valid, nonzero otherwise.
......
...@@ -20,10 +20,6 @@ extern struct movsl_mask { ...@@ -20,10 +20,6 @@ extern struct movsl_mask {
} ____cacheline_aligned_in_smp movsl_mask; } ____cacheline_aligned_in_smp movsl_mask;
#endif #endif
#define __addr_ok(addr) \
((unsigned long __force)(addr) < \
(current_thread_info()->addr_limit.seg))
extern void __put_user_bad(void); extern void __put_user_bad(void);
/* /*
......
...@@ -9,9 +9,6 @@ ...@@ -9,9 +9,6 @@
#include <linux/prefetch.h> #include <linux/prefetch.h>
#include <asm/page.h> #include <asm/page.h>
#define __addr_ok(addr) (!((unsigned long)(addr) & \
(current_thread_info()->addr_limit.seg)))
#define ARCH_HAS_SEARCH_EXTABLE #define ARCH_HAS_SEARCH_EXTABLE
extern void __put_user_1(void); extern void __put_user_1(void);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment