Source-Changes-HG archive

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

[src/netbsd-3]: src/sys/arch/alpha/alpha Pull up revision 1.98 (requested by ...



details:   https://anonhg.NetBSD.org/src/rev/429fbd9cd6bc
branches:  netbsd-3
changeset: 576817:429fbd9cd6bc
user:      tron <tron%NetBSD.org@localhost>
date:      Sat Jul 30 17:55:54 2005 +0000

description:
Pull up revision 1.98 (requested by thorpej in ticket #629):
- Change FPCPU_LOCK() such that the caller is responsible for blocking
  IPIs in the MULTIPROCESSOR case.  Adjust all callers.
- In fpusave_cpu(), block IPIs for the entire duration (while we have
  CPUF_FPUSAVE set in ci_flags) to fix the deadlock that leads to
  "panic: fpsave ipi didn't", as described in PR port-alpha/26383.
  Many thanks to Michael Hitch for the analysis and initial patch which
  this one is derived from.

diffstat:

 sys/arch/alpha/alpha/trap.c |  14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diffs (39 lines):

diff -r 6309af963bc7 -r 429fbd9cd6bc sys/arch/alpha/alpha/trap.c
--- a/sys/arch/alpha/alpha/trap.c       Sat Jul 30 17:55:47 2005 +0000
+++ b/sys/arch/alpha/alpha/trap.c       Sat Jul 30 17:55:54 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: trap.c,v 1.96 2004/08/28 17:53:00 jdolecek Exp $ */
+/* $NetBSD: trap.c,v 1.96.10.1 2005/07/30 17:55:54 tron Exp $ */
 
 /*-
  * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -100,7 +100,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.96 2004/08/28 17:53:00 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.96.10.1 2005/07/30 17:55:54 tron Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -634,12 +634,18 @@
        KDASSERT(l->l_addr->u_pcb.pcb_fpcpu == NULL);
 #endif
 
-       FPCPU_LOCK(&l->l_addr->u_pcb, s);
+#if defined(MULTIPROCESSOR)
+       s = splhigh();          /* block IPIs */
+#endif
+       FPCPU_LOCK(&l->l_addr->u_pcb);
 
        l->l_addr->u_pcb.pcb_fpcpu = ci;
        ci->ci_fpcurlwp = l;
 
-       FPCPU_UNLOCK(&l->l_addr->u_pcb, s);
+       FPCPU_UNLOCK(&l->l_addr->u_pcb);
+#if defined(MULTIPROCESSOR)
+       splx(s);
+#endif
 
        /*
         * Instrument FP usage -- if a process had not previously



Home | Main Index | Thread Index | Old Index