Index: arch/mips64/kernel/ptrace.c =================================================================== RCS file: /home/cvs/linux/arch/mips64/kernel/ptrace.c,v retrieving revision 1.15.2.3 diff -u -r1.15.2.3 ptrace.c --- arch/mips64/kernel/ptrace.c 4 Nov 2002 19:39:56 -0000 1.15.2.3 +++ arch/mips64/kernel/ptrace.c 5 Nov 2002 23:22:13 -0000 @@ -334,23 +334,7 @@ break; case FPR_BASE ... FPR_BASE + 31: if (child->used_math) { - unsigned long *fregs - = (unsigned long *) - &child->thread.fpu.hard.fp_regs[0]; - if (mips_cpu.options & MIPS_CPU_FPU) { -#ifndef CONFIG_SMP - if (last_task_used_math == child) { - __enable_fpu(); - save_fp(child); - __disable_fpu(); - last_task_used_math = NULL; - } -#endif - } else { - fregs = (unsigned long *) - child->thread.fpu.soft.regs; - } - + unsigned long *fregs = get_fpu_regs(child); /* * The odd registers are actually the high * order bits of the values stored in the even @@ -421,25 +405,8 @@ regs->regs[addr] = data; break; case FPR_BASE ... FPR_BASE + 31: { - unsigned long *fregs = (unsigned long *) - &child->thread.fpu.hard.fp_regs[0]; - - if (child->used_math) { -#ifndef CONFIG_SMP - if (mips_cpu.options & MIPS_CPU_FPU) { - if (last_task_used_math == child) { - __enable_fpu(); - save_fp(child); - __disable_fpu(); - last_task_used_math = NULL; - regs->cp0_status &= ~ST0_CU1; - } else { - fregs = (unsigned long *) - child->thread.fpu.soft.regs; - } - } -#endif - } else { + unsigned long *fregs = get_fpu_regs(child); + if (!child->used_math) { /* FP not yet used */ memset(&child->thread.fpu.hard, ~0, sizeof(child->thread.fpu.hard));