aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2008-10-16 09:39:57 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2008-10-16 09:40:05 -0400
commit0b59268285ca6cdc46191f2995bf632088e3e277 (patch)
tree91f95eeb809c5fe13d0ba5b055e26879f9ec9357 /arch
parent04ab591808565f968d4406f6435090ad671ebdab (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>
Diffstat (limited to 'arch')
-rw-r--r--arch/alpha/include/asm/elf.h4
-rw-r--r--arch/arm/include/asm/elf.h2
-rw-r--r--arch/avr32/include/asm/elf.h2
-rw-r--r--arch/blackfin/include/asm/elf.h2
-rw-r--r--arch/h8300/include/asm/elf.h2
-rw-r--r--arch/ia64/ia32/binfmt_elf32.c2
-rw-r--r--arch/ia64/ia32/ia32priv.h4
-rw-r--r--arch/ia64/include/asm/elf.h2
-rw-r--r--arch/m68knommu/include/asm/elf.h2
-rw-r--r--arch/mips/include/asm/elf.h10
-rw-r--r--arch/parisc/kernel/binfmt_elf32.c2
-rw-r--r--arch/powerpc/include/asm/elf.h4
-rw-r--r--arch/s390/include/asm/elf.h8
-rw-r--r--arch/sh/include/asm/elf.h2
-rw-r--r--arch/sparc/include/asm/elf_32.h2
-rw-r--r--arch/sparc/include/asm/elf_64.h6
16 files changed, 24 insertions, 32 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
151extern int alpha_l1i_cacheshape; 151extern int alpha_l1i_cacheshape;
152extern int alpha_l1d_cacheshape; 152extern 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
109extern void elf_set_personality(const struct elf32_hdr *); 109extern 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) \
251do { \ 251do { \
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) \
300do { \ 298do { \
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 \ 304 else \
307 current->thread.abi = &mips_abi; \ 305 current->thread.abi = &mips_abi; \
308 \ 306 \
309 if (ibcs2) \ 307 if (current->personality != PER_LINUX32) \
310 set_personality(PER_SVR4); \
311 else if (current->personality != PER_LINUX32) \
312 set_personality(PER_LINUX); \ 308 set_personality(PER_LINUX); \
313} while (0) 309} while (0)
314 310
diff --git a/arch/parisc/kernel/binfmt_elf32.c b/arch/parisc/kernel/binfmt_elf32.c
index ecb10a4f63c6..f61692d2b557 100644
--- a/arch/parisc/kernel/binfmt_elf32.c
+++ b/arch/parisc/kernel/binfmt_elf32.c
@@ -85,7 +85,7 @@ struct elf_prpsinfo32
85 * could set a processor dependent flag in the thread_struct. 85 * could set a processor dependent flag in the thread_struct.
86 */ 86 */
87 87
88#define SET_PERSONALITY(ex, ibcs2) \ 88#define SET_PERSONALITY(ex) \
89 set_thread_flag(TIF_32BIT); \ 89 set_thread_flag(TIF_32BIT); \
90 current->thread.map_base = DEFAULT_MAP_BASE32; \ 90 current->thread.map_base = DEFAULT_MAP_BASE32; \
91 current->thread.task_size = DEFAULT_TASK_SIZE32 \ 91 current->thread.task_size = DEFAULT_TASK_SIZE32 \
diff --git a/arch/powerpc/include/asm/elf.h b/arch/powerpc/include/asm/elf.h
index 64c6ee22eefd..d812929390e4 100644
--- a/arch/powerpc/include/asm/elf.h
+++ b/arch/powerpc/include/asm/elf.h
@@ -232,7 +232,7 @@ typedef elf_vrregset_t elf_fpxregset_t;
232#endif /* __powerpc64__ */ 232#endif /* __powerpc64__ */
233 233
234#ifdef __powerpc64__ 234#ifdef __powerpc64__
235# define SET_PERSONALITY(ex, ibcs2) \ 235# define SET_PERSONALITY(ex) \
236do { \ 236do { \
237 unsigned long new_flags = 0; \ 237 unsigned long new_flags = 0; \
238 if ((ex).e_ident[EI_CLASS] == ELFCLASS32) \ 238 if ((ex).e_ident[EI_CLASS] == ELFCLASS32) \
@@ -256,7 +256,7 @@ do { \
256# define elf_read_implies_exec(ex, exec_stk) (test_thread_flag(TIF_32BIT) ? \ 256# define elf_read_implies_exec(ex, exec_stk) (test_thread_flag(TIF_32BIT) ? \
257 (exec_stk != EXSTACK_DISABLE_X) : 0) 257 (exec_stk != EXSTACK_DISABLE_X) : 0)
258#else 258#else
259# define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX) 259# define SET_PERSONALITY(ex) set_personality(PER_LINUX)
260#endif /* __powerpc64__ */ 260#endif /* __powerpc64__ */
261 261
262extern int dcache_bsize; 262extern int dcache_bsize;
diff --git a/arch/s390/include/asm/elf.h b/arch/s390/include/asm/elf.h
index 3cad56923815..261785ab5b22 100644
--- a/arch/s390/include/asm/elf.h
+++ b/arch/s390/include/asm/elf.h
@@ -166,13 +166,11 @@ extern char elf_platform[];
166#define ELF_PLATFORM (elf_platform) 166#define ELF_PLATFORM (elf_platform)
167 167
168#ifndef __s390x__ 168#ifndef __s390x__
169#define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX) 169#define SET_PERSONALITY(ex) set_personality(PER_LINUX)
170#else /* __s390x__ */ 170#else /* __s390x__ */
171#define SET_PERSONALITY(ex, ibcs2) \ 171#define SET_PERSONALITY(ex) \
172do { \ 172do { \
173 if (ibcs2) \ 173 if (current->personality != PER_LINUX32) \
174 set_personality(PER_SVR4); \
175 else if (current->personality != PER_LINUX32) \
176 set_personality(PER_LINUX); \ 174 set_personality(PER_LINUX); \
177 if ((ex).e_ident[EI_CLASS] == ELFCLASS32) \ 175 if ((ex).e_ident[EI_CLASS] == ELFCLASS32) \
178 set_thread_flag(TIF_31BIT); \ 176 set_thread_flag(TIF_31BIT); \
diff --git a/arch/sh/include/asm/elf.h b/arch/sh/include/asm/elf.h
index f01449a8d378..ee02db110f0d 100644
--- a/arch/sh/include/asm/elf.h
+++ b/arch/sh/include/asm/elf.h
@@ -189,7 +189,7 @@ do { \
189} while (0) 189} while (0)
190#endif 190#endif
191 191
192#define SET_PERSONALITY(ex, ibcs2) set_personality(PER_LINUX_32BIT) 192#define SET_PERSONALITY(ex) set_personality(PER_LINUX_32BIT)
193struct task_struct; 193struct task_struct;
194extern int dump_task_regs (struct task_struct *, elf_gregset_t *); 194extern int dump_task_regs (struct task_struct *, elf_gregset_t *);
195extern int dump_task_fpu (struct task_struct *, elf_fpregset_t *); 195extern int dump_task_fpu (struct task_struct *, elf_fpregset_t *);
diff --git a/arch/sparc/include/asm/elf_32.h b/arch/sparc/include/asm/elf_32.h
index b7ab60547827..381a1b5256d6 100644
--- a/arch/sparc/include/asm/elf_32.h
+++ b/arch/sparc/include/asm/elf_32.h
@@ -137,6 +137,6 @@ typedef struct {
137 137
138#define ELF_PLATFORM (NULL) 138#define ELF_PLATFORM (NULL)
139 139
140#define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX) 140#define SET_PERSONALITY(ex) set_personality(PER_LINUX)
141 141
142#endif /* !(__ASMSPARC_ELF_H) */ 142#endif /* !(__ASMSPARC_ELF_H) */
diff --git a/arch/sparc/include/asm/elf_64.h b/arch/sparc/include/asm/elf_64.h
index 0818a1308f4e..425c2f9be6d5 100644
--- a/arch/sparc/include/asm/elf_64.h
+++ b/arch/sparc/include/asm/elf_64.h
@@ -195,7 +195,7 @@ static inline unsigned int sparc64_elf_hwcap(void)
195 195
196#define ELF_PLATFORM (NULL) 196#define ELF_PLATFORM (NULL)
197 197
198#define SET_PERSONALITY(ex, ibcs2) \ 198#define SET_PERSONALITY(ex) \
199do { unsigned long new_flags = current_thread_info()->flags; \ 199do { unsigned long new_flags = current_thread_info()->flags; \
200 new_flags &= _TIF_32BIT; \ 200 new_flags &= _TIF_32BIT; \
201 if ((ex).e_ident[EI_CLASS] == ELFCLASS32) \ 201 if ((ex).e_ident[EI_CLASS] == ELFCLASS32) \
@@ -208,9 +208,7 @@ do { unsigned long new_flags = current_thread_info()->flags; \
208 else \ 208 else \
209 clear_thread_flag(TIF_ABI_PENDING); \ 209 clear_thread_flag(TIF_ABI_PENDING); \
210 /* flush_thread will update pgd cache */ \ 210 /* flush_thread will update pgd cache */ \
211 if (ibcs2) \ 211 if (current->personality != PER_LINUX32) \
212 set_personality(PER_SVR4); \
213 else if (current->personality != PER_LINUX32) \
214 set_personality(PER_LINUX); \ 212 set_personality(PER_LINUX); \
215} while (0) 213} while (0)
216 214