Module Name:    src
Committed By:   martin
Date:           Sun May 18 10:43:54 UTC 2014

Modified Files:
        src/sys/arch/alpha/alpha: fp_complete.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/alpha/alpha/fp_complete.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/alpha/alpha/fp_complete.c
diff -u src/sys/arch/alpha/alpha/fp_complete.c:1.17 src/sys/arch/alpha/alpha/fp_complete.c:1.18
--- src/sys/arch/alpha/alpha/fp_complete.c:1.17	Fri May 16 19:18:21 2014
+++ src/sys/arch/alpha/alpha/fp_complete.c	Sun May 18 10:43:54 2014
@@ -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 @@ void
 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

Reply via email to