mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-21 02:08:12 +03:00
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.
This commit is contained in:
parent
a431108ab6
commit
ab87d42200
Notes:
sideshowbarker
2024-07-19 03:05:05 +09:00
Author: https://github.com/supercomputer7 Commit: https://github.com/SerenityOS/serenity/commit/ab87d42200e Pull-request: https://github.com/SerenityOS/serenity/pull/3322 Issue: https://github.com/SerenityOS/serenity/issues/2393
@ -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 };
|
||||
};
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user