diff --git a/Kernel/Interrupts/PIC.cpp b/Kernel/Interrupts/PIC.cpp index 7b4ca9f411..3118bc93ca 100644 --- a/Kernel/Interrupts/PIC.cpp +++ b/Kernel/Interrupts/PIC.cpp @@ -137,8 +137,13 @@ void PIC::eoi(const GenericInterruptHandler& handler) const { InterruptDisabler disabler; ASSERT(!is_hard_disabled()); - ASSERT(handler.interrupt_number() >= gsi_base() && handler.interrupt_number() < interrupt_vectors_count()); - eoi_interrupt(handler.interrupt_number()); + u8 irq = handler.interrupt_number(); + ASSERT(irq >= gsi_base() && irq < interrupt_vectors_count()); + if ((1 << irq) & m_cached_irq_mask) { + spurious_eoi(handler); + return; + } + eoi_interrupt(irq); } void PIC::eoi_interrupt(u8 irq) const diff --git a/Kernel/Interrupts/SpuriousInterruptHandler.cpp b/Kernel/Interrupts/SpuriousInterruptHandler.cpp index 186b570b2a..4a886a588f 100644 --- a/Kernel/Interrupts/SpuriousInterruptHandler.cpp +++ b/Kernel/Interrupts/SpuriousInterruptHandler.cpp @@ -44,7 +44,7 @@ void SpuriousInterruptHandler::unregister_handler(GenericInterruptHandler&) bool SpuriousInterruptHandler::eoi() { // FIXME: Actually check if IRQ7 or IRQ15 are spurious, and if not, call EOI with the correct interrupt number. - m_responsible_irq_controller->spurious_eoi(*this); + m_responsible_irq_controller->eoi(*this); return false; }