lkml.org 
[lkml]   [2008]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 13/16] alpha: use get_personality()
Date
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


\
 
 \ /
  Last update: 2008-02-23 09:39    [W:0.089 / U:1.920 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site