Browse Source

[S390] Add is_32bit_task() helper function

Helper function which tells us if a task is running in ESA mode.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Heiko Carstens 14 năm trước cách đây
mục cha
commit
a05c90f194
2 tập tin đã thay đổi với 7 bổ sung1 xóa
  1. 1 1
      arch/s390/include/asm/compat.h
  2. 6 0
      arch/s390/include/asm/thread_info.h

+ 1 - 1
arch/s390/include/asm/compat.h

@@ -169,7 +169,7 @@ static inline compat_uptr_t ptr_to_compat(void __user *uptr)
 
 static inline int is_compat_task(void)
 {
-	return test_thread_flag(TIF_31BIT);
+	return is_32bit_task();
 }
 
 #else

+ 6 - 0
arch/s390/include/asm/thread_info.h

@@ -118,6 +118,12 @@ static inline struct thread_info *current_thread_info(void)
 #define _TIF_SINGLE_STEP	(1<<TIF_FREEZE)
 #define _TIF_FREEZE		(1<<TIF_FREEZE)
 
+#ifdef CONFIG_64BIT
+#define is_32bit_task()		(test_thread_flag(TIF_31BIT))
+#else
+#define is_32bit_task()		(1)
+#endif
+
 #endif /* __KERNEL__ */
 
 #define PREEMPT_ACTIVE		0x4000000