diff options
author | marius <marius@FreeBSD.org> | 2006-09-03 21:20:21 +0000 |
---|---|---|
committer | marius <marius@FreeBSD.org> | 2006-09-03 21:20:21 +0000 |
commit | e2d308d090b2a64bbf6f8c7ed38c80f4b701e26c (patch) | |
tree | 8abb99467e118d7bdf67e7e4eca0a51743ad5075 /sys/sparc64 | |
parent | 27ee15c183012c2026fb5936eb0fab1e677aad1f (diff) | |
download | FreeBSD-src-e2d308d090b2a64bbf6f8c7ed38c80f4b701e26c.zip FreeBSD-src-e2d308d090b2a64bbf6f8c7ed38c80f4b701e26c.tar.gz |
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
Diffstat (limited to 'sys/sparc64')
-rw-r--r-- | sys/sparc64/sparc64/mp_machdep.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/sparc64/sparc64/mp_machdep.c b/sys/sparc64/sparc64/mp_machdep.c index cb13663..5cd52a2 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 |