Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/alpha/alpha Properly handle PCU_REENABLE in fpu_sta...



details:   https://anonhg.NetBSD.org/src/rev/7a59d9073c4e
branches:  trunk
changeset: 329290:7a59d9073c4e
user:      martin <martin%NetBSD.org@localhost>
date:      Sun May 18 10:43:54 2014 +0000

description:
Properly handle PCU_REENABLE in fpu_state_load. Hint from Nick Hudson.
This seems to help PR port-alpha/48782 a lot.

diffstat:

 sys/arch/alpha/alpha/fp_complete.c |  10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diffs (31 lines):

diff -r 6286d0378c87 -r 7a59d9073c4e sys/arch/alpha/alpha/fp_complete.c
--- a/sys/arch/alpha/alpha/fp_complete.c        Sun May 18 10:36:34 2014 +0000
+++ b/sys/arch/alpha/alpha/fp_complete.c        Sun May 18 10:43:54 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fp_complete.c,v 1.17 2014/05/16 19:18:21 matt Exp $ */
+/* $NetBSD: fp_complete.c,v 1.18 2014/05/18 10:43:54 martin Exp $ */
 
 /*-
  * Copyright (c) 2001 Ross Harvey
@@ -35,7 +35,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: fp_complete.c,v 1.17 2014/05/16 19:18:21 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fp_complete.c,v 1.18 2014/05/18 10:43:54 martin Exp $");
 
 #include "opt_compat_osf1.h"
 
@@ -723,6 +723,12 @@
 fpu_state_load(struct lwp *l, u_int flags)
 {
        struct pcb * const pcb = lwp_getpcb(l);
+       KASSERT(l == curlwp);
+
+       if (flags & PCU_REENABLE) {
+               l->l_md.md_flags |= MDLWP_FPACTIVE;
+               return;
+       }
 
        /*
         * Instrument FP usage -- if a process had not previously



Home | Main Index | Thread Index | Old Index