[MIPS] Unify mips_fpu_soft_struct and mips_fpu_hard_structs.
The struct mips_fpu_soft_struct and mips_fpu_hard_struct are completely same now and the kernel fpu emulator assumes that. This patch unifies them to mips_fpu_struct and get rid of mips_fpu_union. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:
committed by
Ralf Baechle
parent
5deee2dbf4
commit
eae89076e6
@@ -120,11 +120,11 @@ int ptrace_getfpregs (struct task_struct *child, __u32 __user *data)
|
||||
__put_user ((__u64) -1, i + (__u64 __user *) data);
|
||||
}
|
||||
|
||||
__put_user (child->thread.fpu.fcr31, data + 64);
|
||||
|
||||
if (cpu_has_fpu) {
|
||||
unsigned int flags, tmp;
|
||||
|
||||
__put_user (child->thread.fpu.hard.fcr31, data + 64);
|
||||
|
||||
preempt_disable();
|
||||
if (cpu_has_mipsmt) {
|
||||
unsigned int vpflags = dvpe();
|
||||
@@ -142,7 +142,6 @@ int ptrace_getfpregs (struct task_struct *child, __u32 __user *data)
|
||||
preempt_enable();
|
||||
__put_user (tmp, data + 65);
|
||||
} else {
|
||||
__put_user (child->thread.fpu.soft.fcr31, data + 64);
|
||||
__put_user ((__u32) 0, data + 65);
|
||||
}
|
||||
|
||||
@@ -162,10 +161,7 @@ int ptrace_setfpregs (struct task_struct *child, __u32 __user *data)
|
||||
for (i = 0; i < 32; i++)
|
||||
__get_user (fregs[i], i + (__u64 __user *) data);
|
||||
|
||||
if (cpu_has_fpu)
|
||||
__get_user (child->thread.fpu.hard.fcr31, data + 64);
|
||||
else
|
||||
__get_user (child->thread.fpu.soft.fcr31, data + 64);
|
||||
__get_user (child->thread.fpu.fcr31, data + 64);
|
||||
|
||||
/* FIR may not be written. */
|
||||
|
||||
@@ -241,10 +237,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
|
||||
tmp = regs->lo;
|
||||
break;
|
||||
case FPC_CSR:
|
||||
if (cpu_has_fpu)
|
||||
tmp = child->thread.fpu.hard.fcr31;
|
||||
else
|
||||
tmp = child->thread.fpu.soft.fcr31;
|
||||
tmp = child->thread.fpu.fcr31;
|
||||
break;
|
||||
case FPC_EIR: { /* implementation / version register */
|
||||
unsigned int flags;
|
||||
@@ -336,9 +329,9 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
|
||||
|
||||
if (!tsk_used_math(child)) {
|
||||
/* FP not yet used */
|
||||
memset(&child->thread.fpu.hard, ~0,
|
||||
sizeof(child->thread.fpu.hard));
|
||||
child->thread.fpu.hard.fcr31 = 0;
|
||||
memset(&child->thread.fpu, ~0,
|
||||
sizeof(child->thread.fpu));
|
||||
child->thread.fpu.fcr31 = 0;
|
||||
}
|
||||
#ifdef CONFIG_32BIT
|
||||
/*
|
||||
@@ -369,10 +362,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
|
||||
regs->lo = data;
|
||||
break;
|
||||
case FPC_CSR:
|
||||
if (cpu_has_fpu)
|
||||
child->thread.fpu.hard.fcr31 = data;
|
||||
else
|
||||
child->thread.fpu.soft.fcr31 = data;
|
||||
child->thread.fpu.fcr31 = data;
|
||||
break;
|
||||
case DSP_BASE ... DSP_BASE + 5: {
|
||||
dspreg_t *dregs;
|
||||
|
Reference in New Issue
Block a user