All of lore.kernel.org
 help / color / mirror / Atom feed
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>,
	Richard Henderson <rth@twiddle.net>
Subject: [PATCH 13/16] alpha: use get_personality()
Date: Sat, 23 Feb 2008 16:14:16 +0800	[thread overview]
Message-ID: <1203754594597-git-send-email-xiyou.wangcong@gmail.com> (raw)
In-Reply-To: <1203754579637-git-send-email-xiyou.wangcong@gmail.com>

Use get_personality() macro instead of explicit reference
for alpha code.

Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
Cc: Richard Henderson <rth@twiddle.net>

---
 arch/alpha/kernel/osf_sys.c   |    6 +++---
 include/asm-alpha/processor.h |    4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c
index 8c71daf..df825a4 100644
--- a/arch/alpha/kernel/osf_sys.c
+++ b/arch/alpha/kernel/osf_sys.c
@@ -1266,7 +1266,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
 	unsigned long limit;
 
 	/* "32 bit" actually means 31 bit, since pointers sign extend.  */
-	if (current->personality & ADDR_LIMIT_32BIT)
+	if (get_personality() & ADDR_LIMIT_32BIT)
 		limit = 0x80000000;
 	else
 		limit = TASK_SIZE;
@@ -1327,7 +1327,7 @@ osf_fix_iov_len(const struct iovec __user *iov, unsigned long count)
 asmlinkage ssize_t
 osf_readv(unsigned long fd, const struct iovec __user * vector, unsigned long count)
 {
-	if (unlikely(personality(current->personality) == PER_OSF4))
+	if (unlikely(personality(get_personality()) == PER_OSF4))
 		if (osf_fix_iov_len(vector, count))
 			return -EFAULT;
 	return sys_readv(fd, vector, count);
@@ -1336,7 +1336,7 @@ osf_readv(unsigned long fd, const struct iovec __user * vector, unsigned long co
 asmlinkage ssize_t
 osf_writev(unsigned long fd, const struct iovec __user * vector, unsigned long count)
 {
-	if (unlikely(personality(current->personality) == PER_OSF4))
+	if (unlikely(personality(get_personality()) == PER_OSF4))
 		if (osf_fix_iov_len(vector, count))
 			return -EFAULT;
 	return sys_writev(fd, vector, count);
diff --git a/include/asm-alpha/processor.h b/include/asm-alpha/processor.h
index 94afe58..6c164b9 100644
--- a/include/asm-alpha/processor.h
+++ b/include/asm-alpha/processor.h
@@ -21,7 +21,7 @@
 #define TASK_SIZE (0x40000000000UL)
 
 #define STACK_TOP \
-  (current->personality & ADDR_LIMIT_32BIT ? 0x80000000 : 0x00120000000UL)
+  (get_personality() & ADDR_LIMIT_32BIT ? 0x80000000 : 0x00120000000UL)
 
 #define STACK_TOP_MAX	0x00120000000UL
 
@@ -29,7 +29,7 @@
  * space during mmap's.
  */
 #define TASK_UNMAPPED_BASE \
-  ((current->personality & ADDR_LIMIT_32BIT) ? 0x40000000 : TASK_SIZE / 2)
+  ((get_personality() & ADDR_LIMIT_32BIT) ? 0x40000000 : TASK_SIZE / 2)
 
 typedef struct {
 	unsigned long seg;
-- 
1.5.3.8


  reply	other threads:[~2008-02-23  8:36 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                   ` [PATCH 10/16] s390: " WANG Cong
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                         ` WANG Cong [this message]
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=1203754594597-git-send-email-xiyou.wangcong@gmail.com \
    --to=xiyou.wangcong@gmail.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rth@twiddle.net \
    /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.