summaryrefslogtreecommitdiffstats
path: root/include/asm-mips/compat.h
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2006-03-31 22:34:58 +0200
committerSteven Whitehouse <swhiteho@redhat.com>2006-03-31 22:34:58 +0200
commit86579dd06deecfa6ac88d5e84e4d63c397cd6f6d (patch)
treeb4475d3ccde53015ad84a06e4e55e64591171b75 /include/asm-mips/compat.h
parent[GFS2] Update ioctl() to new interface (diff)
parent[PATCH] splice exports (diff)
downloadlinux-86579dd06deecfa6ac88d5e84e4d63c397cd6f6d.tar.xz
linux-86579dd06deecfa6ac88d5e84e4d63c397cd6f6d.zip
Merge branch 'master'
Diffstat (limited to 'include/asm-mips/compat.h')
-rw-r--r--include/asm-mips/compat.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/include/asm-mips/compat.h b/include/asm-mips/compat.h
index 35d2604fe69c..986511db54a6 100644
--- a/include/asm-mips/compat.h
+++ b/include/asm-mips/compat.h
@@ -128,17 +128,22 @@ typedef u32 compat_sigset_word;
*/
typedef u32 compat_uptr_t;
-static inline void *compat_ptr(compat_uptr_t uptr)
+static inline void __user *compat_ptr(compat_uptr_t uptr)
{
- return (void *)(long)uptr;
+ return (void __user *)(long)uptr;
}
-static inline void *compat_alloc_user_space(long len)
+static inline compat_uptr_t ptr_to_compat(void __user *uptr)
+{
+ return (u32)(unsigned long)uptr;
+}
+
+static inline void __user *compat_alloc_user_space(long len)
{
struct pt_regs *regs = (struct pt_regs *)
((unsigned long) current_thread_info() + THREAD_SIZE - 32) - 1;
- return (void *) (regs->regs[29] - len);
+ return (void __user *) (regs->regs[29] - len);
}
#if defined (__MIPSEL__)
#define __COMPAT_ENDIAN_SWAP__ 1