diff options
Diffstat (limited to 'arch/sparc/include/asm/elf_64.h')
| -rw-r--r-- | arch/sparc/include/asm/elf_64.h | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/arch/sparc/include/asm/elf_64.h b/arch/sparc/include/asm/elf_64.h index ff66bb88537b..e67880381b84 100644 --- a/arch/sparc/include/asm/elf_64.h +++ b/arch/sparc/include/asm/elf_64.h | |||
| @@ -195,17 +195,10 @@ static inline unsigned int sparc64_elf_hwcap(void) | |||
| 195 | #define ELF_PLATFORM (NULL) | 195 | #define ELF_PLATFORM (NULL) |
| 196 | 196 | ||
| 197 | #define SET_PERSONALITY(ex) \ | 197 | #define SET_PERSONALITY(ex) \ |
| 198 | do { unsigned long new_flags = current_thread_info()->flags; \ | 198 | do { if ((ex).e_ident[EI_CLASS] == ELFCLASS32) \ |
| 199 | new_flags &= _TIF_32BIT; \ | 199 | set_thread_flag(TIF_32BIT); \ |
| 200 | if ((ex).e_ident[EI_CLASS] == ELFCLASS32) \ | ||
| 201 | new_flags |= _TIF_32BIT; \ | ||
| 202 | else \ | 200 | else \ |
| 203 | new_flags &= ~_TIF_32BIT; \ | 201 | clear_thread_flag(TIF_32BIT); \ |
| 204 | if ((current_thread_info()->flags & _TIF_32BIT) \ | ||
| 205 | != new_flags) \ | ||
| 206 | set_thread_flag(TIF_ABI_PENDING); \ | ||
| 207 | else \ | ||
| 208 | clear_thread_flag(TIF_ABI_PENDING); \ | ||
| 209 | /* flush_thread will update pgd cache */ \ | 202 | /* flush_thread will update pgd cache */ \ |
| 210 | if (personality(current->personality) != PER_LINUX32) \ | 203 | if (personality(current->personality) != PER_LINUX32) \ |
| 211 | set_personality(PER_LINUX | \ | 204 | set_personality(PER_LINUX | \ |
