Put the __insn_barrier() inside the spinloop for the DIAGNOSTIC case, so
that we have a barrier for the DIAGNOSTIC case too.
This commit is contained in:
parent
9e33bb5bf7
commit
c03d07d01d
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: fpu.c,v 1.15 2006/04/20 13:23:14 christos Exp $ */
|
||||
/* $NetBSD: fpu.c,v 1.16 2006/05/21 06:17:12 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1991 The Regents of the University of California.
|
||||
|
@ -71,7 +71,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.15 2006/04/20 13:23:14 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.16 2006/05/21 06:17:12 christos Exp $");
|
||||
|
||||
#include "opt_multiprocessor.h"
|
||||
|
||||
|
@ -372,17 +372,15 @@ fpusave_lwp(struct lwp *l, int save)
|
|||
#ifdef DIAGNOSTIC
|
||||
spincount = 0;
|
||||
#endif
|
||||
while (l->l_addr->u_pcb.pcb_fpcpu != NULL)
|
||||
while (l->l_addr->u_pcb.pcb_fpcpu != NULL) {
|
||||
#ifdef DIAGNOSTIC
|
||||
{
|
||||
spincount++;
|
||||
if (spincount > 10000000) {
|
||||
panic("fp_save ipi didn't");
|
||||
}
|
||||
}
|
||||
#else
|
||||
__insn_barrier();
|
||||
#endif
|
||||
__insn_barrier();
|
||||
}
|
||||
}
|
||||
#else
|
||||
KASSERT(ci->ci_fpcurlwp == l);
|
||||
|
|
Loading…
Reference in New Issue