[PATCH 13/16] alpha: use get_personality()

From: WANG Cong
Date: Sat Feb 23 2008 - 03:36:44 EST


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

Signed-off-by: WANG Cong <xiyou.wangcong@xxxxxxxxx>
Cc: Richard Henderson <rth@xxxxxxxxxxx>

---
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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/