From 7d7ce7f24ebd6987e2b23f585340aa7ae153765b Mon Sep 17 00:00:00 2001 From: Marius Strobl Date: Sun, 3 Sep 2006 21:20:21 +0000 Subject: [PATCH] Do as the USII CPU manual suggests and leave interrupts enabled for a bit before retrying to resend an IPI in order to avoid deadlocks if the other CPU is also trying to send one. OpenSolaris uses a delay of 1 microsecond here but waiting 2 microseconds with interrupts enabled like Linux does shouldn't hurt but is a bit safer. MFC after: 1 day --- sys/sparc64/sparc64/mp_machdep.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/sparc64/sparc64/mp_machdep.c b/sys/sparc64/sparc64/mp_machdep.c index cb13663e8be..5cd52a20eb5 100644 --- a/sys/sparc64/sparc64/mp_machdep.c +++ b/sys/sparc64/sparc64/mp_machdep.c @@ -456,6 +456,12 @@ cpu_ipi_send(u_int mid, u_long d0, u_long d1, u_long d2) intr_restore(s); if ((ids & IDR_NACK) == 0) return; + /* + * Leave interrupts enabled for a bit before retrying + * in order to avoid deadlocks if the other CPU is also + * trying to send an IPI. + */ + DELAY(2); } if ( #ifdef KDB