X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Fasm-mips%2Fcompat.h;h=dce92079e7fc4e70c64177c86d47ce36fb34ee52;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=88ca4d50d42a7a2c075e893e0c3e23329e7e0f4e;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/include/asm-mips/compat.h b/include/asm-mips/compat.h index 88ca4d50d..dce92079e 100644 --- a/include/asm-mips/compat.h +++ b/include/asm-mips/compat.h @@ -132,10 +132,13 @@ static inline void *compat_ptr(compat_uptr_t uptr) static inline void *compat_alloc_user_space(long len) { - unsigned long sp = (unsigned long) current_thread_info() + - THREAD_SIZE - 32; + struct pt_regs *regs = (struct pt_regs *) + ((unsigned long) current_thread_info() + THREAD_SIZE - 32) - 1; - return (void *) (sp - len); + return (void *) (regs->regs[29] - len); } +#if defined (__MIPSEL__) +#define __COMPAT_ENDIAN_SWAP__ 1 +#endif #endif /* _ASM_COMPAT_H */