From: Ingo Molnar Date: Mon, 27 Mar 2006 09:16:09 +0000 (-0800) Subject: [PATCH] s390: add ptr_to_compat() X-Git-Tag: v2.6.17-rc1~386 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=f267fa9f5b377b5cecdb2baf332fec08bb71246d;p=linux-2.6-omap-h63xx.git [PATCH] s390: add ptr_to_compat() Add ptr_to_compat() to s390 - needed by the new robust-futex code. Signed-off-by: Ingo Molnar Cc: Heiko Carstens Cc: Martin Schwidefsky untested. CHECKME: am i right about the 0x7fffffffUL masking? Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/asm-s390/compat.h b/include/asm-s390/compat.h index a007715f4ae..356a0b18353 100644 --- a/include/asm-s390/compat.h +++ b/include/asm-s390/compat.h @@ -128,6 +128,11 @@ static inline void __user *compat_ptr(compat_uptr_t uptr) return (void __user *)(unsigned long)(uptr & 0x7fffffffUL); } +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) { unsigned long stack;