From: Ingo Molnar 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 --- include/asm-s390/compat.h | 5 +++++ 1 files changed, 5 insertions(+) diff -puN include/asm-s390/compat.h~s390-add-ptr-compatpatch include/asm-s390/compat.h --- 25/include/asm-s390/compat.h~s390-add-ptr-compatpatch Wed Feb 22 15:23:31 2006 +++ 25-akpm/include/asm-s390/compat.h Wed Feb 22 15:23:31 2006 @@ -128,6 +128,11 @@ static inline void __user *compat_ptr(co 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; _