diff options
author | Vegard Nossum <vegard.nossum@gmail.com> | 2009-06-15 15:50:49 +0200 |
---|---|---|
committer | Vegard Nossum <vegard.nossum@gmail.com> | 2009-06-15 15:50:49 +0200 |
commit | 722f2a6c87f34ee0fd0130a8cf45f81e0705594a (patch) | |
tree | 50b054df34d2731eb0ba0cf1a6c27e43e7eed428 /arch/s390/include/asm/compat.h | |
parent | 7a0aeb14e18ad59394bd9bbc6e57fb345819e748 (diff) | |
parent | 45e3e1935e2857c54783291107d33323b3ef33c8 (diff) | |
download | op-kernel-dev-722f2a6c87f34ee0fd0130a8cf45f81e0705594a.zip op-kernel-dev-722f2a6c87f34ee0fd0130a8cf45f81e0705594a.tar.gz |
Merge commit 'linus/master' into HEAD
Conflicts:
MAINTAINERS
Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
Diffstat (limited to 'arch/s390/include/asm/compat.h')
-rw-r--r-- | arch/s390/include/asm/compat.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/arch/s390/include/asm/compat.h b/arch/s390/include/asm/compat.h index de065b3..01a0802 100644 --- a/arch/s390/include/asm/compat.h +++ b/arch/s390/include/asm/compat.h @@ -5,6 +5,7 @@ */ #include <linux/types.h> #include <linux/sched.h> +#include <linux/thread_info.h> #define PSW32_MASK_PER 0x40000000UL #define PSW32_MASK_DAT 0x04000000UL @@ -163,12 +164,28 @@ static inline compat_uptr_t ptr_to_compat(void __user *uptr) return (u32)(unsigned long)uptr; } +#ifdef CONFIG_COMPAT + +static inline int is_compat_task(void) +{ + return test_thread_flag(TIF_31BIT); +} + +#else + +static inline int is_compat_task(void) +{ + return 0; +} + +#endif + static inline void __user *compat_alloc_user_space(long len) { unsigned long stack; stack = KSTK_ESP(current); - if (test_thread_flag(TIF_31BIT)) + if (is_compat_task()) stack &= 0x7fffffffUL; return (void __user *) (stack - len); } |