diff options
| author | christos <christos@NetBSD.org> | 2013-12-01 01:05:16 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 2013-12-01 01:05:16 +0000 |
| commit | c959d6a130dfad714fbd1d87af0d6b44104f459a (patch) | |
| tree | a84474c53767f50a1417a5c8147b2ff9bfdd577d /sys/compat/linux | |
| parent | 12b62c496dbd8fa6bacd35b21f62b3dd1d4b0f55 (diff) | |
revert fpu/pcu changes until we figure out what's wrong; they cause random
freezes
Diffstat (limited to 'sys/compat/linux')
| -rw-r--r-- | sys/compat/linux/arch/amd64/linux_machdep.c | 13 | ||||
| -rw-r--r-- | sys/compat/linux/arch/i386/linux_machdep.c | 6 |
2 files changed, 10 insertions, 9 deletions
diff --git a/sys/compat/linux/arch/amd64/linux_machdep.c b/sys/compat/linux/arch/amd64/linux_machdep.c index c630405e1b5..f36cfab82c7 100644 --- a/sys/compat/linux/arch/amd64/linux_machdep.c +++ b/sys/compat/linux/arch/amd64/linux_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux_machdep.c,v 1.42 2013/11/18 01:32:32 chs Exp $ */ +/* $NetBSD: linux_machdep.c,v 1.43 2013/12/01 01:05:16 christos Exp $ */ /*- * Copyright (c) 2005 Emmanuel Dreyfus, all rights reserved. @@ -33,7 +33,7 @@ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.42 2013/11/18 01:32:32 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.43 2013/12/01 01:05:16 christos Exp $"); #include <sys/param.h> #include <sys/types.h> @@ -44,7 +44,6 @@ __KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.42 2013/11/18 01:32:32 chs Exp $ #include <sys/ptrace.h> /* for process_read_fpregs() */ #include <sys/ucontext.h> #include <sys/conf.h> -#include <sys/pcu.h> #include <machine/reg.h> #include <machine/pcb.h> @@ -65,7 +64,6 @@ __KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.42 2013/11/18 01:32:32 chs Exp $ #include <dev/wscons/wsdisplay_usl_io.h> #endif -extern const pcu_ops_t fpu_ops; #include <compat/linux/common/linux_signal.h> #include <compat/linux/common/linux_errno.h> @@ -86,8 +84,11 @@ linux_setregs(struct lwp *l, struct exec_package *epp, vaddr_t stack) struct pcb *pcb = lwp_getpcb(l); struct trapframe *tf; - pcu_discard(&fpu_ops, false); + /* If we were using the FPU, forget about it. */ + if (pcb->pcb_fpcpu != NULL) + fpusave_lwp(l, 0); + l->l_md.md_flags &= ~MDL_USEDFPU; pcb->pcb_flags = 0; pcb->pcb_savefpu.fp_fxsave.fx_fcw = __NetBSD_NPXCW__; pcb->pcb_savefpu.fp_fxsave.fx_mxcsr = __INITIAL_MXCSR__; @@ -155,7 +156,7 @@ linux_sendsig(const ksiginfo_t *ksi, const sigset_t *mask) /* * Save FPU state, if any */ - if (pcu_used_p(&fpu_ops)) { + if (l->l_md.md_flags & MDL_USEDFPU) { sp = (char *) (((long)sp - sizeof(struct linux__fpstate)) & ~0xfUL); fpsp = (struct linux__fpstate *)sp; diff --git a/sys/compat/linux/arch/i386/linux_machdep.c b/sys/compat/linux/arch/i386/linux_machdep.c index a0d392fb49d..1edf3de9e9b 100644 --- a/sys/compat/linux/arch/i386/linux_machdep.c +++ b/sys/compat/linux/arch/i386/linux_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux_machdep.c,v 1.152 2013/10/23 20:18:51 drochner Exp $ */ +/* $NetBSD: linux_machdep.c,v 1.153 2013/12/01 01:05:16 christos Exp $ */ /*- * Copyright (c) 1995, 2000, 2008, 2009 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.152 2013/10/23 20:18:51 drochner Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.153 2013/12/01 01:05:16 christos Exp $"); #if defined(_KERNEL_OPT) #include "opt_vm86.h" @@ -139,7 +139,7 @@ linux_setregs(struct lwp *l, struct exec_package *epp, vaddr_t stack) pmap_ldt_cleanup(l); #endif - pcu_discard_all(l); + l->l_md.md_flags &= ~MDL_USEDFPU; if (i386_use_fxsave) { pcb->pcb_savefpu.sv_xmm.sv_env.en_cw = __Linux_NPXCW__; |
