linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RFC: remove ibcs2/PER_SVR4?
@ 2008-10-01  8:45 Martin Schwidefsky
  2008-10-01 16:08 ` Ralf Baechle
  0 siblings, 1 reply; 4+ messages in thread
From: Martin Schwidefsky @ 2008-10-01  8:45 UTC (permalink / raw)
  To: linux-arch

Greetings,
I stumbled across SET_PERSONALITY and the ibcs2/PER_SVR4 personality once
more. I never really understood why it is there and with the current code
it is in fact completely unused. The minimal patch I will do is the one
below, it just removes ibcs2/PER_SVR4 for s390. I think the same could be
done for all architectures and the SET_PERSONALITY macro could drop the
ibcs2 argument. Before I go ahead and do a patch across all architectures:
does anybody out there still needs ibcs2/PER_SVR4?

--
blue skies,
  Martin.

"Reality continues to ruin my life." - Calvin.
---
Subject: [PATCH] remove unused ibcs2/PER_SVR4 in SET_PERSONALITY

From: Martin Schwidefsky <schwidefsky@de.ibm.com>

There is no PER_SVR4 personality for s390 and the SET_PERSONALITY macros is
always called with ibcs2==0. Remove the useless code.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
---

 arch/s390/include/asm/elf.h |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff -urpN linux-2.6/arch/s390/include/asm/elf.h linux-2.6-patched/arch/s390/include/asm/elf.h
--- linux-2.6/arch/s390/include/asm/elf.h	2008-10-01 10:02:09.000000000 +0200
+++ linux-2.6-patched/arch/s390/include/asm/elf.h	2008-10-01 10:25:38.000000000 +0200
@@ -170,13 +170,11 @@ extern char elf_platform[];
 #define ELF_PLATFORM (elf_platform)
 
 #ifndef __s390x__
-#define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX)
+#define SET_PERSONALITY(ex, ibcs2) set_personality(PER_LINUX)
 #else /* __s390x__ */
 #define SET_PERSONALITY(ex, ibcs2)			\
 do {							\
-	if (ibcs2)					\
-		set_personality(PER_SVR4);		\
-	else if (current->personality != PER_LINUX32)	\
+	if (current->personality != PER_LINUX32)	\
 		set_personality(PER_LINUX);		\
 	if ((ex).e_ident[EI_CLASS] == ELFCLASS32)	\
 		set_thread_flag(TIF_31BIT);		\

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-10-03 20:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-01  8:45 RFC: remove ibcs2/PER_SVR4? Martin Schwidefsky
2008-10-01 16:08 ` Ralf Baechle
2008-10-01 16:17   ` Martin Schwidefsky
2008-10-03 20:21   ` Martin Schwidefsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).