1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 09:24:57 +00:00

Kernel: Set IRQHandler m_shared_with_others when the irq is shared

If IRQHandler's IRQ is shared, then disable_irq() should not call the
controller to disable that IRQ as some other device might be using it.
IRQHandler had a private variable to indicate if it is being shared:
m_shared_with_others but it was never modified even if the IRQ was
shared.

Add a new member function set_shared_with_others() to enable/disable
m_shared_with_others member of IRQHandler class. This function is
called when an IRQHandler is being added/removed as a part of
SharedIRQHandler.
This commit is contained in:
Pankaj Raghav 2023-04-12 18:49:43 +02:00 committed by Andreas Kling
parent 868a3912f4
commit fd8a154f8c
2 changed files with 4 additions and 0 deletions

View file

@ -32,6 +32,7 @@ public:
virtual size_t sharing_devices_count() const override { return 0; }
virtual bool is_shared_handler() const override { return false; }
virtual bool is_sharing_with_others() const override { return m_shared_with_others; }
void set_shared_with_others(bool status) { m_shared_with_others = status; }
protected:
void change_irq_number(u8 irq);