diff options
Diffstat (limited to 'sys/x86/x86/local_apic.c')
-rw-r--r-- | sys/x86/x86/local_apic.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/sys/x86/x86/local_apic.c b/sys/x86/x86/local_apic.c index cf2114d..106a842 100644 --- a/sys/x86/x86/local_apic.c +++ b/sys/x86/x86/local_apic.c @@ -1657,9 +1657,10 @@ native_lapic_ipi_raw(register_t icrlo, u_int dest) ("%s: reserved bits set in ICR LO register", __func__)); /* Set destination in ICR HI register if it is being used. */ - saveintr = intr_disable(); - if (!x2apic_mode) + if (!x2apic_mode) { + saveintr = intr_disable(); icr = lapic_read_icr(); + } if ((icrlo & APIC_DEST_MASK) == APIC_DEST_DESTFLD) { if (x2apic_mode) { @@ -1682,7 +1683,8 @@ native_lapic_ipi_raw(register_t icrlo, u_int dest) vlo |= icrlo; } lapic_write_icr(vhi, vlo); - intr_restore(saveintr); + if (!x2apic_mode) + intr_restore(saveintr); } #define BEFORE_SPIN 50000 @@ -1701,11 +1703,10 @@ native_lapic_ipi_vectored(u_int vector, int dest) icrlo = APIC_DESTMODE_PHY | APIC_TRIGMOD_EDGE | APIC_LEVEL_ASSERT; /* - * IPI_STOP_HARD is just a "fake" vector used to send a NMI. - * Use special rules regard NMI if passed, otherwise specify - * the vector. + * NMI IPIs are just fake vectors used to send a NMI. Use special rules + * regarding NMIs if passed, otherwise specify the vector. */ - if (vector == IPI_STOP_HARD) + if (vector >= IPI_NMI_FIRST) icrlo |= APIC_DELMODE_NMI; else icrlo |= vector | APIC_DELMODE_FIXED; |