From c60df69fb2b24e3a97458c6a19ea2d89df404f86 Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Mon, 8 Mar 2004 00:15:29 +0000 Subject: [PATCH] MFi386: wait for local apic to become free before using it --- sys/amd64/amd64/local_apic.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/amd64/amd64/local_apic.c b/sys/amd64/amd64/local_apic.c index 65d8c899f90e..54efeeadd74e 100644 --- a/sys/amd64/amd64/local_apic.c +++ b/sys/amd64/amd64/local_apic.c @@ -691,8 +691,8 @@ lapic_ipi_raw(register_t icrlo, u_int dest) intr_restore(eflags); } -#ifdef DETECT_DEADLOCK #define BEFORE_SPIN 1000000 +#ifdef DETECT_DEADLOCK #define AFTER_SPIN 1000 #endif @@ -723,11 +723,9 @@ lapic_ipi_vectored(u_int vector, int dest) destfield = dest; } -#ifdef DETECT_DEADLOCK - /* Check for an earlier stuck IPI. */ + /* Wait for an earlier IPI to finish. */ if (!lapic_ipi_wait(BEFORE_SPIN)) panic("APIC: Previous IPI is stuck"); -#endif lapic_ipi_raw(icrlo, destfield);