summaryrefslogtreecommitdiffstats
path: root/include/asm-x86/uaccess.h
diff options
context:
space:
mode:
authorGlauber Costa <gcosta@redhat.com>2008-06-25 11:08:51 -0300
committerIngo Molnar <mingo@elte.hu>2008-07-09 09:14:19 +0200
commit002ca1690c3d0a495e6aedd608281aeb01ce6385 (patch)
treeb44eacf9cb730b3a3f47e0f3848fac43f68af97e /include/asm-x86/uaccess.h
parent865e5b76505cdade261773bde32f785b3ce579f1 (diff)
downloadop-kernel-dev-002ca1690c3d0a495e6aedd608281aeb01ce6385.zip
op-kernel-dev-002ca1690c3d0a495e6aedd608281aeb01ce6385.tar.gz
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>
Diffstat (limited to 'include/asm-x86/uaccess.h')
-rw-r--r--include/asm-x86/uaccess.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/asm-x86/uaccess.h b/include/asm-x86/uaccess.h
index 8cb580c..8a1e45f 100644
--- a/include/asm-x86/uaccess.h
+++ b/include/asm-x86/uaccess.h
@@ -33,6 +33,10 @@
#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.
OpenPOWER on IntegriCloud