From: WANG Cong <xiyou.wangcong@gmail.com>
To: Andrew Morton <akpm@osdl.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
WANG Cong <xiyou.wangcong@gmail.com>,
schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com
Subject: [PATCH 10/16] s390: use get_personality()
Date: Sat, 23 Feb 2008 16:14:13 +0800 [thread overview]
Message-ID: <12037545611159-git-send-email-xiyou.wangcong@gmail.com> (raw)
In-Reply-To: <12037545522455-git-send-email-xiyou.wangcong@gmail.com>
Use get_personality() macro instead of explicit reference
for s390 code.
Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
Cc: schwidefsky@de.ibm.com
Cc: heiko.carstens@de.ibm.com
---
arch/s390/kernel/binfmt_elf32.c | 2 +-
arch/s390/kernel/sys_s390.c | 4 ++--
arch/s390/mm/mmap.c | 2 +-
include/asm-s390/elf.h | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/s390/kernel/binfmt_elf32.c b/arch/s390/kernel/binfmt_elf32.c
index 3e1c315..6a55911 100644
--- a/arch/s390/kernel/binfmt_elf32.c
+++ b/arch/s390/kernel/binfmt_elf32.c
@@ -78,7 +78,7 @@
do { \
if (ibcs2) \
set_personality(PER_SVR4); \
- else if (current->personality != PER_LINUX32) \
+ else if (get_personality() != PER_LINUX32) \
set_personality(PER_LINUX); \
set_thread_flag(TIF_31BIT); \
} while (0)
diff --git a/arch/s390/kernel/sys_s390.c b/arch/s390/kernel/sys_s390.c
index fefee99..f8371fe 100644
--- a/arch/s390/kernel/sys_s390.c
+++ b/arch/s390/kernel/sys_s390.c
@@ -215,7 +215,7 @@ asmlinkage long s390x_newuname(struct new_utsname __user *name)
{
int ret = sys_newuname(name);
- if (current->personality == PER_LINUX32 && !ret) {
+ if (get_personality() == PER_LINUX32 && !ret) {
ret = copy_to_user(name->machine, "s390\0\0\0\0", 8);
if (ret) ret = -EFAULT;
}
@@ -226,7 +226,7 @@ asmlinkage long s390x_personality(unsigned long personality)
{
int ret;
- if (current->personality == PER_LINUX32 && personality == PER_LINUX)
+ if (get_personality() == PER_LINUX32 && personality == PER_LINUX)
personality = PER_LINUX32;
ret = sys_personality(personality);
if (ret == PER_LINUX32)
diff --git a/arch/s390/mm/mmap.c b/arch/s390/mm/mmap.c
index 5932a82..f5bf304 100644
--- a/arch/s390/mm/mmap.c
+++ b/arch/s390/mm/mmap.c
@@ -59,7 +59,7 @@ static inline int mmap_is_legacy(void)
return 1;
#endif
return sysctl_legacy_va_layout ||
- (current->personality & ADDR_COMPAT_LAYOUT) ||
+ (get_personality() & ADDR_COMPAT_LAYOUT) ||
current->signal->rlim[RLIMIT_STACK].rlim_cur == RLIM_INFINITY;
}
diff --git a/include/asm-s390/elf.h b/include/asm-s390/elf.h
index b3ac262..18482d3 100644
--- a/include/asm-s390/elf.h
+++ b/include/asm-s390/elf.h
@@ -202,7 +202,7 @@ extern char elf_platform[];
do { \
if (ibcs2) \
set_personality(PER_SVR4); \
- else if (current->personality != PER_LINUX32) \
+ else if (get_personality() != PER_LINUX32) \
set_personality(PER_LINUX); \
clear_thread_flag(TIF_31BIT); \
} while (0)
--
1.5.3.8
next prev parent reply other threads:[~2008-02-23 8:34 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-23 8:14 [PATCH 00/16] (Resend) Use get_personality() WANG Cong
2008-02-23 8:14 ` [PATCH 01/16] Make the macro get_personality function-like WANG Cong
2008-02-23 8:14 ` [PATCH 02/16] mm: use get_personality() WANG Cong
2008-02-23 8:14 ` [PATCH 03/16] fs: " WANG Cong
2008-02-23 8:14 ` [PATCH 04/16] powerpc: " WANG Cong
2008-02-23 8:14 ` [PATCH 05/16] parisc: " WANG Cong
2008-02-23 8:14 ` [PATCH 06/16] sparc(64): " WANG Cong
2008-02-23 8:14 ` WANG Cong
2008-02-23 8:14 ` [PATCH 07/16] arm: " WANG Cong
2008-02-23 8:14 ` [PATCH 08/16] x86: " WANG Cong
2008-02-23 8:14 ` [PATCH 09/16] um: " WANG Cong
2008-02-23 8:14 ` WANG Cong [this message]
2008-02-23 8:14 ` [PATCH 11/16] mips: " WANG Cong
2008-02-23 8:14 ` [PATCH 12/16] ia64: " WANG Cong
2008-02-23 8:14 ` [PATCH 13/16] alpha: " WANG Cong
2008-02-23 8:14 ` [PATCH 14/16] frv: " WANG Cong
2008-02-23 8:14 ` [PATCH 15/16] mn10300: " WANG Cong
2008-02-23 8:14 ` [PATCH 16/16] kernel: " WANG Cong
2008-02-23 12:03 ` [PATCH 15/16] mn10300: " David Howells
2008-02-23 12:02 ` [PATCH 14/16] frv: " David Howells
2008-02-23 10:08 ` [PATCH 08/16] x86: " Ingo Molnar
2008-02-23 10:19 ` Ingo Molnar
2008-02-23 10:39 ` WANG Cong
2008-02-23 9:06 ` Accessor macros vs reference counting Matthew Wilcox
2008-02-23 12:46 ` David Newall
2008-02-23 14:56 ` Matthew Wilcox
2008-02-23 8:58 ` [PATCH 01/16] Make the macro get_personality function-like Bryan Wu
2008-02-23 12:02 ` David Howells
2008-02-23 8:51 ` [PATCH 00/16] (Resend) Use get_personality() Alexey Dobriyan
2008-02-23 8:59 ` WANG Cong
2008-02-23 9:27 ` Alexey Dobriyan
2008-02-23 9:56 ` WANG Cong
2008-02-23 18:37 ` Christoph Hellwig
2008-02-23 19:16 ` Andrew Morton
2008-02-24 4:03 ` WANG Cong
2008-02-25 2:14 ` [PATCH] Remove the macro get_personality WANG Cong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=12037545611159-git-send-email-xiyou.wangcong@gmail.com \
--to=xiyou.wangcong@gmail.com \
--cc=akpm@osdl.org \
--cc=heiko.carstens@de.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=schwidefsky@de.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.