[PATCH] mips: clean up 32/64-bit configuration
Start cleaning 32-bit vs. 64-bit configuration. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
63fb6fd1c8
commit
875d43e72b
@@ -124,7 +124,7 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data)
|
||||
if (tsk_used_math(child)) {
|
||||
fpureg_t *fregs = get_fpu_regs(child);
|
||||
|
||||
#ifdef CONFIG_MIPS32
|
||||
#ifdef CONFIG_32BIT
|
||||
/*
|
||||
* The odd registers are actually the high
|
||||
* order bits of the values stored in the even
|
||||
@@ -135,7 +135,7 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data)
|
||||
else
|
||||
tmp = (unsigned long) (fregs[(addr - 32)] & 0xffffffff);
|
||||
#endif
|
||||
#ifdef CONFIG_MIPS64
|
||||
#ifdef CONFIG_64BIT
|
||||
tmp = fregs[addr - FPR_BASE];
|
||||
#endif
|
||||
} else {
|
||||
@@ -213,7 +213,7 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data)
|
||||
sizeof(child->thread.fpu.hard));
|
||||
child->thread.fpu.hard.fcr31 = 0;
|
||||
}
|
||||
#ifdef CONFIG_MIPS32
|
||||
#ifdef CONFIG_32BIT
|
||||
/*
|
||||
* The odd registers are actually the high order bits
|
||||
* of the values stored in the even registers - unless
|
||||
@@ -227,7 +227,7 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data)
|
||||
fregs[addr - FPR_BASE] |= data;
|
||||
}
|
||||
#endif
|
||||
#ifdef CONFIG_MIPS64
|
||||
#ifdef CONFIG_64BIT
|
||||
fregs[addr - FPR_BASE] = data;
|
||||
#endif
|
||||
break;
|
||||
@@ -304,14 +304,14 @@ out:
|
||||
static inline int audit_arch(void)
|
||||
{
|
||||
#ifdef CONFIG_CPU_LITTLE_ENDIAN
|
||||
#ifdef CONFIG_MIPS64
|
||||
#ifdef CONFIG_64BIT
|
||||
if (!(current->thread.mflags & MF_32BIT_REGS))
|
||||
return AUDIT_ARCH_MIPSEL64;
|
||||
#endif /* MIPS64 */
|
||||
return AUDIT_ARCH_MIPSEL;
|
||||
|
||||
#else /* big endian... */
|
||||
#ifdef CONFIG_MIPS64
|
||||
#ifdef CONFIG_64BIT
|
||||
if (!(current->thread.mflags & MF_32BIT_REGS))
|
||||
return AUDIT_ARCH_MIPS64;
|
||||
#endif /* MIPS64 */
|
||||
|
Reference in New Issue
Block a user