[PARISC] Switch is_compat_task to use TIF_32BIT
authorKyle McMartin <kyle@parisc-linux.org>
Sun, 27 Aug 2006 15:04:26 +0000 (11:04 -0400)
committerMatthew Wilcox <willy@parisc-linux.org>
Wed, 4 Oct 2006 12:46:42 +0000 (06:46 -0600)
Stop using PER_LINUX32 to designate processes needing
compaterizing. Convert is_compat_task to use TIF_32BIT and
set TIF_32BIT in binfmt_elf32.c

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
arch/parisc/kernel/binfmt_elf32.c
arch/parisc/kernel/signal.c
include/asm-parisc/compat.h
include/asm-parisc/processor.h

index d1833f164bbeaad34084dc92cfc82882e6759efb..1e64e7b88110157df77334416f7d8a703bea4449 100644 (file)
@@ -87,7 +87,7 @@ struct elf_prpsinfo32
  */
 
 #define SET_PERSONALITY(ex, ibcs2) \
-       current->personality = PER_LINUX32; \
+       set_thread_flag(TIF_32BIT); \
        current->thread.map_base = DEFAULT_MAP_BASE32; \
        current->thread.task_size = DEFAULT_TASK_SIZE32 \
 
@@ -102,25 +102,3 @@ cputime_to_compat_timeval(const cputime_t cputime, struct compat_timeval *value)
 }
 
 #include "../../../fs/binfmt_elf.c"
-
-/* Set up a separate execution domain for ELF32 binaries running
- * on an ELF64 kernel */
-
-static struct exec_domain parisc32_exec_domain = { 
-       .name = "Linux/ELF32",
-       .pers_low = PER_LINUX32,
-       .pers_high = PER_LINUX32,
-};      
-
-static int __init parisc32_exec_init(void)
-{
-       /* steal the identity signal mappings from the default domain */
-       parisc32_exec_domain.signal_map = default_exec_domain.signal_map;
-       parisc32_exec_domain.signal_invmap = default_exec_domain.signal_invmap;
-
-       register_exec_domain(&parisc32_exec_domain);
-
-       return 0;
-}
-
-__initcall(parisc32_exec_init);
index bb83880c5ee3458bd9940b96e527bf9146cb96e9..ee6653edeb7a1b83da64572c03d9d0620319558f 100644 (file)
@@ -26,7 +26,6 @@
 #include <linux/stddef.h>
 #include <linux/compat.h>
 #include <linux/elf.h>
-#include <linux/personality.h>
 #include <asm/ucontext.h>
 #include <asm/rt_sigframe.h>
 #include <asm/uaccess.h>
@@ -433,13 +432,13 @@ setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
        if (in_syscall) {
                regs->gr[31] = haddr;
 #ifdef __LP64__
-               if (personality(current->personality) == PER_LINUX)
+               if (!test_thread_flag(TIF_32BIT))
                        sigframe_size |= 1;
 #endif
        } else {
                unsigned long psw = USER_PSW;
 #ifdef __LP64__
-               if (personality(current->personality) == PER_LINUX)
+               if (!test_thread_flag(TIF_32BIT))
                        psw |= PSW_W;
 #endif
 
index 71b4eeea205a1a85eda581179fd97b46eeee0e83..fe8579023531d5a8e8788eea06c7f672f161fa36 100644 (file)
@@ -5,7 +5,7 @@
  */
 #include <linux/types.h>
 #include <linux/sched.h>
-#include <linux/personality.h>
+#include <linux/thread_info.h>
 
 #define COMPAT_USER_HZ 100
 
@@ -152,7 +152,7 @@ static __inline__ void __user *compat_alloc_user_space(long len)
 
 static inline int __is_compat_task(struct task_struct *t)
 {
-       return personality(t->personality) == PER_LINUX32;
+       return test_ti_thread_flag(t->thread_info, TIF_32BIT);
 }
 
 static inline int is_compat_task(void)
index 4313618c98ee036eeec45f2ce1cedf83a928159b..fd7866dc8c83462b2d8a3274ac4118b5315de8d2 100644 (file)
@@ -278,7 +278,7 @@ on downward growing arches, it looks like this:
  */
 
 #ifdef __LP64__
-#define USER_WIDE_MODE (personality(current->personality) == PER_LINUX)
+#define USER_WIDE_MODE (!test_thread_flag(TIF_32BIT))
 #else
 #define USER_WIDE_MODE 0
 #endif