diff options
| author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2008-10-16 09:39:57 -0400 |
|---|---|---|
| committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2008-10-16 09:40:05 -0400 |
| commit | 0b59268285ca6cdc46191f2995bf632088e3e277 (patch) | |
| tree | 91f95eeb809c5fe13d0ba5b055e26879f9ec9357 | |
| parent | 04ab591808565f968d4406f6435090ad671ebdab (diff) | |
[PATCH] remove unused ibcs2/PER_SVR4 in SET_PERSONALITY
The SET_PERSONALITY macro is always called with a second argument of 0.
Remove the ibcs argument and the various tests to set the PER_SVR4
personality.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
28 files changed, 39 insertions, 47 deletions
diff --git a/arch/alpha/include/asm/elf.h b/arch/alpha/include/asm/elf.h index fc1002ea1e0c..5c75c1b2352a 100644 --- a/arch/alpha/include/asm/elf.h +++ b/arch/alpha/include/asm/elf.h | |||
| @@ -144,9 +144,9 @@ extern int dump_elf_task_fp(elf_fpreg_t *dest, struct task_struct *task); | |||
| 144 | : amask (AMASK_CIX) ? "ev6" : "ev67"); \ | 144 | : amask (AMASK_CIX) ? "ev6" : "ev67"); \ |
| 145 | }) | 145 | }) |
| 146 | 146 | ||
| 147 | #define SET_PERSONALITY(EX, IBCS2) \ | 147 | #define SET_PERSONALITY(EX) \ |
| 148 | set_personality(((EX).e_flags & EF_ALPHA_32BIT) \ | 148 | set_personality(((EX).e_flags & EF_ALPHA_32BIT) \ |
| 149 | ? PER_LINUX_32BIT : (IBCS2) ? PER_SVR4 : PER_LINUX) | 149 | ? PER_LINUX_32BIT : PER_LINUX) |
| 150 | 150 | ||
| 151 | extern int alpha_l1i_cacheshape; | 151 | extern int alpha_l1i_cacheshape; |
| 152 | extern int alpha_l1d_cacheshape; | 152 | extern int alpha_l1d_cacheshape; |
diff --git a/arch/arm/include/asm/elf.h b/arch/arm/include/asm/elf.h index 5be016980c19..a58378c343b9 100644 --- a/arch/arm/include/asm/elf.h +++ b/arch/arm/include/asm/elf.h | |||
| @@ -107,6 +107,6 @@ extern int arm_elf_read_implies_exec(const struct elf32_hdr *, int); | |||
| 107 | #define ELF_PLAT_INIT(_r, load_addr) (_r)->ARM_r0 = 0 | 107 | #define ELF_PLAT_INIT(_r, load_addr) (_r)->ARM_r0 = 0 |
| 108 | 108 | ||
| 109 | extern void elf_set_personality(const struct elf32_hdr *); | 109 | extern void elf_set_personality(const struct elf32_hdr *); |
| 110 | #define SET_PERSONALITY(ex, ibcs2) elf_set_personality(&(ex)) | 110 | #define SET_PERSONALITY(ex) elf_set_personality(&(ex)) |
| 111 | 111 | ||
| 112 | #endif | 112 | #endif |
diff --git a/arch/avr32/include/asm/elf.h b/arch/avr32/include/asm/elf.h index 64ce40ee1d58..d5d1d41c600a 100644 --- a/arch/avr32/include/asm/elf.h +++ b/arch/avr32/include/asm/elf.h | |||
| @@ -103,6 +103,6 @@ typedef struct user_fpu_struct elf_fpregset_t; | |||
| 103 | 103 | ||
| 104 | #define ELF_PLATFORM (NULL) | 104 | #define ELF_PLATFORM (NULL) |
| 105 | 105 | ||
| 106 | #define SET_PERSONALITY(ex, ibcs2) set_personality(PER_LINUX_32BIT) | 106 | #define SET_PERSONALITY(ex) set_personality(PER_LINUX_32BIT) |
| 107 | 107 | ||
| 108 | #endif /* __ASM_AVR32_ELF_H */ | 108 | #endif /* __ASM_AVR32_ELF_H */ |
diff --git a/arch/blackfin/include/asm/elf.h b/arch/blackfin/include/asm/elf.h index 67a03a8a353e..cdbfcfc30f6a 100644 --- a/arch/blackfin/include/asm/elf.h +++ b/arch/blackfin/include/asm/elf.h | |||
| @@ -122,6 +122,6 @@ do { \ | |||
| 122 | 122 | ||
| 123 | #define ELF_PLATFORM (NULL) | 123 | #define ELF_PLATFORM (NULL) |
| 124 | 124 | ||
| 125 | #define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX) | 125 | #define SET_PERSONALITY(ex) set_personality(PER_LINUX) |
| 126 | 126 | ||
| 127 | #endif | 127 | #endif |
diff --git a/arch/h8300/include/asm/elf.h b/arch/h8300/include/asm/elf.h index a8b57d1f4128..94e2284c8816 100644 --- a/arch/h8300/include/asm/elf.h +++ b/arch/h8300/include/asm/elf.h | |||
| @@ -55,7 +55,7 @@ typedef unsigned long elf_fpregset_t; | |||
| 55 | 55 | ||
| 56 | #define ELF_PLATFORM (NULL) | 56 | #define ELF_PLATFORM (NULL) |
| 57 | 57 | ||
| 58 | #define SET_PERSONALITY(ex, ibcs2) set_personality(PER_LINUX) | 58 | #define SET_PERSONALITY(ex) set_personality(PER_LINUX) |
| 59 | 59 | ||
| 60 | #define R_H8_NONE 0 | 60 | #define R_H8_NONE 0 |
| 61 | #define R_H8_DIR32 1 | 61 | #define R_H8_DIR32 1 |
diff --git a/arch/ia64/ia32/binfmt_elf32.c b/arch/ia64/ia32/binfmt_elf32.c index 4f0c30c38e99..f92bdaac8976 100644 --- a/arch/ia64/ia32/binfmt_elf32.c +++ b/arch/ia64/ia32/binfmt_elf32.c | |||
| @@ -41,7 +41,7 @@ randomize_stack_top(unsigned long stack_top); | |||
| 41 | #define elf_map elf32_map | 41 | #define elf_map elf32_map |
| 42 | 42 | ||
| 43 | #undef SET_PERSONALITY | 43 | #undef SET_PERSONALITY |
| 44 | #define SET_PERSONALITY(ex, ibcs2) elf32_set_personality() | 44 | #define SET_PERSONALITY(ex) elf32_set_personality() |
| 45 | 45 | ||
| 46 | #define elf_read_implies_exec(ex, have_pt_gnu_stack) (!(have_pt_gnu_stack)) | 46 | #define elf_read_implies_exec(ex, have_pt_gnu_stack) (!(have_pt_gnu_stack)) |
| 47 | 47 | ||
diff --git a/arch/ia64/ia32/ia32priv.h b/arch/ia64/ia32/ia32priv.h index dd0c53687a96..0f15349c3c6b 100644 --- a/arch/ia64/ia32/ia32priv.h +++ b/arch/ia64/ia32/ia32priv.h | |||
| @@ -332,8 +332,8 @@ void ia64_elf32_init(struct pt_regs *regs); | |||
| 332 | #define ELF_PLATFORM NULL | 332 | #define ELF_PLATFORM NULL |
| 333 | 333 | ||
| 334 | #ifdef __KERNEL__ | 334 | #ifdef __KERNEL__ |
| 335 | # define SET_PERSONALITY(EX,IBCS2) \ | 335 | # define SET_PERSONALITY(EX) \ |
| 336 | (current->personality = (IBCS2) ? PER_SVR4 : PER_LINUX) | 336 | (current->personality = PER_LINUX) |
| 337 | #endif | 337 | #endif |
| 338 | 338 | ||
| 339 | #define IA32_EFLAG 0x200 | 339 | #define IA32_EFLAG 0x200 |
diff --git a/arch/ia64/include/asm/elf.h b/arch/ia64/include/asm/elf.h index 2acb6b6543c9..86eddee029cb 100644 --- a/arch/ia64/include/asm/elf.h +++ b/arch/ia64/include/asm/elf.h | |||
| @@ -202,7 +202,7 @@ extern void ia64_elf_core_copy_regs (struct pt_regs *src, elf_gregset_t dst); | |||
| 202 | relevant until we have real hardware to play with... */ | 202 | relevant until we have real hardware to play with... */ |
| 203 | #define ELF_PLATFORM NULL | 203 | #define ELF_PLATFORM NULL |
| 204 | 204 | ||
| 205 | #define SET_PERSONALITY(ex, ibcs2) set_personality(PER_LINUX) | 205 | #define SET_PERSONALITY(ex) set_personality(PER_LINUX) |
| 206 | #define elf_read_implies_exec(ex, executable_stack) \ | 206 | #define elf_read_implies_exec(ex, executable_stack) \ |
| 207 | ((executable_stack!=EXSTACK_DISABLE_X) && ((ex).e_flags & EF_IA_64_LINUX_EXECUTABLE_STACK) != 0) | 207 | ((executable_stack!=EXSTACK_DISABLE_X) && ((ex).e_flags & EF_IA_64_LINUX_EXECUTABLE_STACK) != 0) |
| 208 | 208 | ||
diff --git a/arch/m68knommu/include/asm/elf.h b/arch/m68knommu/include/asm/elf.h index 27f0ec70fba8..b8046837f384 100644 --- a/arch/m68knommu/include/asm/elf.h +++ b/arch/m68knommu/include/asm/elf.h | |||
| @@ -105,6 +105,6 @@ typedef struct user_m68kfp_struct elf_fpregset_t; | |||
| 105 | 105 | ||
| 106 | #define ELF_PLATFORM (NULL) | 106 | #define ELF_PLATFORM (NULL) |
| 107 | 107 | ||
| 108 | #define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX) | 108 | #define SET_PERSONALITY(ex) set_personality(PER_LINUX) |
| 109 | 109 | ||
| 110 | #endif | 110 | #endif |
diff --git a/arch/mips/include/asm/elf.h b/arch/mips/include/asm/elf.h index f69f7acba637..a8eac1697b3d 100644 --- a/arch/mips/include/asm/elf.h +++ b/arch/mips/include/asm/elf.h | |||
| @@ -247,10 +247,8 @@ extern struct mips_abi mips_abi_n32; | |||
| 247 | 247 | ||
| 248 | #ifdef CONFIG_32BIT | 248 | #ifdef CONFIG_32BIT |
| 249 | 249 | ||
| 250 | #define SET_PERSONALITY(ex, ibcs2) \ | 250 | #define SET_PERSONALITY(ex) \ |
| 251 | do { \ | 251 | do { \ |
| 252 | if (ibcs2) \ | ||
| 253 | set_personality(PER_SVR4); \ | ||
| 254 | set_personality(PER_LINUX); \ | 252 | set_personality(PER_LINUX); \ |
| 255 | \ | 253 | \ |
| 256 | current->thread.abi = &mips_abi; \ | 254 | current->thread.abi = &mips_abi; \ |
| @@ -296,7 +294,7 @@ do { \ | |||
| 296 | #define __SET_PERSONALITY32(ex) do { } while (0) | 294 | #define __SET_PERSONALITY32(ex) do { } while (0) |
| 297 | #endif | 295 | #endif |
| 298 | 296 | ||
| 299 | #define SET_PERSONALITY(ex, ibcs2) \ | 297 | #define SET_PERSONALITY(ex) \ |
| 300 | do { \ | 298 | do { \ |
| 301 | clear_thread_flag(TIF_32BIT_REGS); \ | 299 | clear_thread_flag(TIF_32BIT_REGS); \ |
| 302 | clear_thread_flag(TIF_32BIT_ADDR); \ | 300 | clear_thread_flag(TIF_32BIT_ADDR); \ |
| @@ -306,9 +304,7 @@ do { \ | |||
| 306 | else \ | ||
