summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2007-10-27 20:04:29 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2007-10-27 20:04:29 +0000
commitd8c944bf8111b650dc8741c28861aadf71f6174d (patch)
tree42b231841ff6937e338e8cb3a0168e46735f24aa
parent225137d131c37304b8cf51805e6eb0446fddfc30 (diff)
Since ipis are not synchronous, make sure that ci_fpproc is not NULL before
invoking savefpstate in ipi_save_fpstate. ok kettenis@
-rw-r--r--sys/arch/sparc64/sparc64/locore.s5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/arch/sparc64/sparc64/locore.s b/sys/arch/sparc64/sparc64/locore.s
index 4bf72cd0f09..baab493741f 100644
--- a/sys/arch/sparc64/sparc64/locore.s
+++ b/sys/arch/sparc64/sparc64/locore.s
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.s,v 1.95 2007/10/27 17:17:23 kettenis Exp $ */
+/* $OpenBSD: locore.s,v 1.96 2007/10/27 20:04:28 miod Exp $ */
/* $NetBSD: locore.s,v 1.137 2001/08/13 06:10:10 jdolecek Exp $ */
/*
@@ -3369,10 +3369,13 @@ ENTRY(ipi_save_fpstate)
membar #Sync
sethi %hi(FPPROC), %o0
ldx [%o0 + %lo(FPPROC)], %o0
+ brz,pn %o0, 1f
+ nop
call savefpstate
ldx [%o0 + P_FPSTATE], %o0
sethi %hi(FPPROC), %o0
stx %g0, [%o0 + %lo(FPPROC)] ! fpproc = NULL
+1:
mov CTX_PRIMARY, %o2
stxa %g7, [%o2] ASI_DMMU
membar #Sync