Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/compat/linux32/arch/amd64/linux32_machdep.c,v rcsdiff: /ftp/cvs/cvsroot/src/sys/compat/linux32/arch/amd64/linux32_machdep.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.31 retrieving revision 1.31.4.1 diff -u -p -r1.31 -r1.31.4.1 --- src/sys/compat/linux32/arch/amd64/linux32_machdep.c 2012/07/15 15:17:56 1.31 +++ src/sys/compat/linux32/arch/amd64/linux32_machdep.c 2014/05/18 17:45:33 1.31.4.1 @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_machdep.c,v 1.31 2012/07/15 15:17:56 dsl Exp $ */ +/* $NetBSD: linux32_machdep.c,v 1.31.4.1 2014/05/18 17:45:33 rmind Exp $ */ /*- * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved. @@ -31,7 +31,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__KERNEL_RCSID(0, "$NetBSD: linux32_machdep.c,v 1.31 2012/07/15 15:17:56 dsl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux32_machdep.c,v 1.31.4.1 2014/05/18 17:45:33 rmind Exp $"); #include #include @@ -41,6 +41,8 @@ __KERNEL_RCSID(0, "$NetBSD: linux32_mach #include #include +#include + #include #include @@ -273,22 +275,16 @@ linux32_setregs(struct lwp *l, struct ex struct trapframe *tf; struct proc *p = l->l_proc; - /* If we were using the FPU, forget about it. */ - if (pcb->pcb_fpcpu != NULL) - fpusave_lwp(l, 0); - #if defined(USER_LDT) && 0 pmap_ldt_cleanup(p); #endif netbsd32_adjust_limits(p); - l->l_md.md_flags &= ~MDL_USEDFPU; + fpu_save_area_clear(l, __Linux_NPXCW__); + l->l_md.md_flags |= MDL_COMPAT32; /* Forces iret not sysret */ pcb->pcb_flags = PCB_COMPAT32; - pcb->pcb_savefpu.fp_fxsave.fx_fcw = __Linux_NPXCW__; - pcb->pcb_savefpu.fp_fxsave.fx_mxcsr = __INITIAL_MXCSR__; - pcb->pcb_savefpu.fp_fxsave.fx_mxcsr_mask = __INITIAL_MXCSR_MASK__; p->p_flag |= PK_32;