Merge commit 'linus/master' into sched-fixes-for-linus
[cascardo/linux.git] / include / asm-mips / elf.h
index ebd6bfb..f69f7ac 100644 (file)
@@ -239,8 +239,6 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
 
 #endif /* !defined(ELF_ARCH) */
 
-#ifdef __KERNEL__
-
 struct mips_abi;
 
 extern struct mips_abi mips_abi;
@@ -265,7 +263,7 @@ do {                                                                        \
 #ifdef CONFIG_MIPS32_N32
 #define __SET_PERSONALITY32_N32()                                      \
        do {                                                            \
-               current->thread.mflags |= MF_N32;                       \
+               set_thread_flag(TIF_32BIT_ADDR);                        \
                current->thread.abi = &mips_abi_n32;                    \
        } while (0)
 #else
@@ -276,7 +274,8 @@ do {                                                                        \
 #ifdef CONFIG_MIPS32_O32
 #define __SET_PERSONALITY32_O32()                                      \
        do {                                                            \
-               current->thread.mflags |= MF_O32;                       \
+               set_thread_flag(TIF_32BIT_REGS);                        \
+               set_thread_flag(TIF_32BIT_ADDR);                        \
                current->thread.abi = &mips_abi_32;                     \
        } while (0)
 #else
@@ -299,13 +298,13 @@ do {                                                                      \
 
 #define SET_PERSONALITY(ex, ibcs2)                                     \
 do {                                                                   \
-       current->thread.mflags &= ~MF_ABI_MASK;                         \
+       clear_thread_flag(TIF_32BIT_REGS);                              \
+       clear_thread_flag(TIF_32BIT_ADDR);                              \
+                                                                       \
        if ((ex).e_ident[EI_CLASS] == ELFCLASS32)                       \
                __SET_PERSONALITY32(ex);                                \
-       else {                                                          \
-               current->thread.mflags |= MF_N64;                       \
+       else                                                            \
                current->thread.abi = &mips_abi;                        \
-       }                                                               \
                                                                        \
        if (ibcs2)                                                      \
                set_personality(PER_SVR4);                              \
@@ -318,7 +317,7 @@ do {                                                                        \
 struct task_struct;
 
 extern void elf_dump_regs(elf_greg_t *, struct pt_regs *regs);
-extern int dump_task_regs (struct task_struct *, elf_gregset_t *);
+extern int dump_task_regs(struct task_struct *, elf_gregset_t *);
 extern int dump_task_fpu(struct task_struct *, elf_fpregset_t *);
 
 #define ELF_CORE_COPY_REGS(elf_regs, regs)                     \
@@ -327,8 +326,6 @@ extern int dump_task_fpu(struct task_struct *, elf_fpregset_t *);
 #define ELF_CORE_COPY_FPREGS(tsk, elf_fpregs)                  \
        dump_task_fpu(tsk, elf_fpregs)
 
-#endif /* __KERNEL__ */
-
 #define USE_ELF_CORE_DUMP
 #define ELF_EXEC_PAGESIZE      PAGE_SIZE