From ab87d42200eca5796eb188b50c8fde1ed5e92e5f Mon Sep 17 00:00:00 2001 From: Liav A Date: Fri, 28 Aug 2020 00:30:06 +0300 Subject: [PATCH] Kernel: Remove the enabled concept of IRQ handlers An IRQ handler should always be ready to respond to any IRQ. We must remember that hardware can generate IRQs without any interaction from our code at all. Ignoring IRQs in such cases is obviously not the right thing to do. --- Kernel/Interrupts/GenericInterruptHandler.h | 3 --- Kernel/Interrupts/SharedIRQHandler.cpp | 7 ++----- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/Kernel/Interrupts/GenericInterruptHandler.h b/Kernel/Interrupts/GenericInterruptHandler.h index 2202b69a081..d15041ab76f 100644 --- a/Kernel/Interrupts/GenericInterruptHandler.h +++ b/Kernel/Interrupts/GenericInterruptHandler.h @@ -48,8 +48,6 @@ public: u8 interrupt_number() const { return m_interrupt_number; } - bool is_enabled() const { return m_enabled; } - size_t get_invoking_count() const { return m_invoking_count; } virtual size_t sharing_devices_count() const = 0; @@ -69,7 +67,6 @@ protected: private: size_t m_invoking_count { 0 }; - bool m_enabled { false }; u8 m_interrupt_number { 0 }; bool m_disable_remap { false }; }; diff --git a/Kernel/Interrupts/SharedIRQHandler.cpp b/Kernel/Interrupts/SharedIRQHandler.cpp index 0342de60f2f..32ff6cf0447 100644 --- a/Kernel/Interrupts/SharedIRQHandler.cpp +++ b/Kernel/Interrupts/SharedIRQHandler.cpp @@ -98,11 +98,8 @@ void SharedIRQHandler::handle_interrupt(const RegisterState& regs) dbg() << "Going for Interrupt Handling @ " << i << ", Shared Interrupt " << interrupt_number(); #endif ASSERT(handler != nullptr); - if (handler->is_enabled()) { - handler->increment_invoking_counter(); - handler->handle_interrupt(regs); - } - + handler->increment_invoking_counter(); + handler->handle_interrupt(regs); #ifdef INTERRUPT_DEBUG dbg() << "Going for Interrupt Handling @ " << i << ", Shared Interrupt " << interrupt_number() << " - End"; #endif