Kernel: Add m_reserved private variable to GenericInterruptHandler

Pin-based PCI device are allocated an IRQ, and it could be shared with
multiple devices. An interrupt handler with an IRQ for a PCI device
will get registered only during the driver initialization.

For MSI(x) interrupts, the driver has to allocate IRQs and this field
can be used to skip IRQs that have already been reserved by pin-based
interrupts so that we don't have to share IRQs, which generally will
reduce the performance.
This commit is contained in:
Pankaj Raghav 2023-04-28 14:06:26 +02:00 committed by Jelle Raaijmakers
parent b5e593d0e7
commit e5cc78e9db

View file

@ -48,6 +48,8 @@ public:
virtual bool eoi() = 0;
void increment_call_count();
void set_reserved() { m_reserved = true; };
bool reserved() const { return m_reserved; };
protected:
void change_interrupt_number(u8 number);
@ -61,6 +63,7 @@ private:
u8 m_interrupt_number { 0 };
bool m_disable_remap { false };
bool m_registered { false };
bool m_reserved { false };
IntrusiveListNode<GenericInterruptHandler> m_list_node;