From a116c017a21c680c01b416e9780bab8015ecd6a5 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Thu, 13 Jan 2011 21:19:43 +0000 Subject: 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@ --- sys/arch/sparc64/sparc64/vm_machdep.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'sys/arch/sparc64') 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 -- cgit v1.2.3