Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] s390: add ptr_to_compat()

Add ptr_to_compat() to s390 - needed by the new robust-futex code.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>

untested. CHECKME: am i right about the 0x7fffffffUL masking?

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Ingo Molnar and committed by
Linus Torvalds
f267fa9f 66e863ac

+5
+5
include/asm-s390/compat.h
··· 128 128 return (void __user *)(unsigned long)(uptr & 0x7fffffffUL); 129 129 } 130 130 131 + static inline compat_uptr_t ptr_to_compat(void __user *uptr) 132 + { 133 + return (u32)(unsigned long)uptr; 134 + } 135 + 131 136 static inline void __user *compat_alloc_user_space(long len) 132 137 { 133 138 unsigned long stack;