From: Ingo Molnar Date: Mon, 27 Mar 2006 09:16:13 +0000 (-0800) Subject: [PATCH] mips: add ptr_to_compat() X-Git-Tag: v2.6.17-rc1~384 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=62ac285f3c701f0457a15fe01baa64a965c4f5f1;p=linux-2.6-omap-h63xx.git [PATCH] mips: add ptr_to_compat() Add ptr_to_compat() - needed by the new robust futex code. Signed-off-by: Ingo Molnar Cc: Ralf Baechle Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/asm-mips/compat.h b/include/asm-mips/compat.h index 0012bd804d2..986511db54a 100644 --- a/include/asm-mips/compat.h +++ b/include/asm-mips/compat.h @@ -133,6 +133,11 @@ static inline void __user *compat_ptr(compat_uptr_t uptr) return (void __user *)(long)uptr; } +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 *)