X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=include%2Fasm-sparc64%2Fcompat.h;h=f260b58f5ce9d34ac224d2781bf4e0ac277849d4;hb=c3b19ff06e0808555403491d61e8f0cbbb53e933;hp=c73935dc7ba11c8e800b79596d6ae27e3431fd30;hpb=f5c7f03113fc9c547012cf403aec4b534d575ef0;p=linux-2.6-omap-h63xx.git diff --git a/include/asm-sparc64/compat.h b/include/asm-sparc64/compat.h index c73935dc7ba..f260b58f5ce 100644 --- a/include/asm-sparc64/compat.h +++ b/include/asm-sparc64/compat.h @@ -31,8 +31,10 @@ typedef s32 compat_timer_t; typedef s32 compat_int_t; typedef s32 compat_long_t; +typedef s64 compat_s64; typedef u32 compat_uint_t; typedef u32 compat_ulong_t; +typedef u64 compat_u64; struct compat_timespec { compat_time_t tv_sec; @@ -150,7 +152,7 @@ typedef u32 compat_sigset_word; * A pointer passed in from user mode. This should not * be used for syscall parameters, just declare them * as pointers because the syscall entry code will have - * appropriately comverted them already. + * appropriately converted them already. */ typedef u32 compat_uptr_t; @@ -164,7 +166,7 @@ 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) +static inline void __user *compat_alloc_user_space(long len) { struct pt_regs *regs = current_thread_info()->kregs; unsigned long usp = regs->u_regs[UREG_I6]; @@ -174,7 +176,10 @@ static __inline__ void __user *compat_alloc_user_space(long len) else usp &= 0xffffffffUL; - return (void __user *) (usp - len); + usp -= len; + usp &= ~0x7UL; + + return (void __user *) usp; } struct compat_ipc64_perm {