Skip to content

Commit

Permalink
[S390] Add is_32bit_task() helper function
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Heiko Carstens authored and Martin Schwidefsky committed Jan 12, 2011
1 parent 9887a1f commit a05c90f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion arch/s390/include/asm/compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions arch/s390/include/asm/thread_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a05c90f

Please sign in to comment.