diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2011-01-13 21:19:43 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2011-01-13 21:19:43 +0000 |
commit | a116c017a21c680c01b416e9780bab8015ecd6a5 (patch) | |
tree | d4e3a60d85861e76f17d18529693868726a11dc2 | |
parent | 01a1ec95f8cc3d0d6da6b2cab5f50dfc1d281db0 (diff) |
Spin forever when waiting for completion of an FPU shootdown instead of
panicing if we spin for too long. It is difficult to find an upper bound
for the spin count and there is some evidence the current limit is too low.
We made similar changes to amd64/i386 some time ago.
ok deraadt@
-rw-r--r-- | sys/arch/sparc64/sparc64/vm_machdep.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/sys/arch/sparc64/sparc64/vm_machdep.c b/sys/arch/sparc64/sparc64/vm_machdep.c index 54941ea07db..0e7b07d4c20 100644 --- a/sys/arch/sparc64/sparc64/vm_machdep.c +++ b/sys/arch/sparc64/sparc64/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.26 2008/09/30 18:54:29 miod Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.27 2011/01/13 21:19:42 kettenis Exp $ */ /* $NetBSD: vm_machdep.c,v 1.38 2001/06/30 00:02:20 eeh Exp $ */ /* @@ -335,21 +335,14 @@ fpusave_proc(struct proc *p, int save) } for (ci = cpus; ci != NULL; ci = ci->ci_next) { - int spincount = 0; - if (ci == curcpu()) continue; if (ci->ci_fpproc != p) continue; sparc64_send_ipi(ci->ci_itid, save ? ipi_save_fpstate : ipi_drop_fpstate, (vaddr_t)p, 0); - while(ci->ci_fpproc == p) { - spincount++; - if (spincount > 10000000) { - panic("ipi_save_fpstate didn't"); - } + while(ci->ci_fpproc == p) sparc_membar(Sync); - } break; } #else |