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 Update PCU_REENABLE for MP. For UP, ad...
details: https://anonhg.NetBSD.org/src/rev/a4c93d2f9d73
branches: trunk
changeset: 329311:a4c93d2f9d73
user: matt <matt%NetBSD.org@localhost>
date: Mon May 19 07:09:10 2014 +0000
description:
Update PCU_REENABLE for MP. For UP, add a KASSERT to make sure it's never
present.
diffstat:
sys/arch/alpha/alpha/fp_complete.c | 16 +++++++++++++---
1 files changed, 13 insertions(+), 3 deletions(-)
diffs (40 lines):
diff -r b06c63e6bdf7 -r a4c93d2f9d73 sys/arch/alpha/alpha/fp_complete.c
--- a/sys/arch/alpha/alpha/fp_complete.c Mon May 19 06:55:54 2014 +0000
+++ b/sys/arch/alpha/alpha/fp_complete.c Mon May 19 07:09:10 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fp_complete.c,v 1.20 2014/05/19 06:55:54 matt Exp $ */
+/* $NetBSD: fp_complete.c,v 1.21 2014/05/19 07:09:10 matt 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.20 2014/05/19 06:55:54 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fp_complete.c,v 1.21 2014/05/19 07:09:10 matt Exp $");
#include "opt_compat_osf1.h"
@@ -731,10 +731,20 @@
struct pcb * const pcb = lwp_getpcb(l);
KASSERT(l == curlwp);
+#ifdef MULTIPROCESSOR
+ /*
+ * If the LWP got switched to another CPU, pcu_switchpoint would have
+ * called state_release to clear MDLWP_FPACTIVE. Now that we are back
+ * on the CPU that has our FP context, set MDLWP_FPACTIVE again.
+ */
if (flags & PCU_REENABLE) {
- KASSERT(l->l_md.md_flags & MDLWP_FPACTIVE);
+ KASSERT(flags & PCU_VALID);
+ l->l_md.md_flags |= MDLWP_FPACTIVE;
return;
}
+#else
+ KASSERT((flags & PCU_REENABLE) == 0);
+#endif
/*
* Instrument FP usage -- if a process had not previously
Home |
Main Index |
Thread Index |
Old Index