diff options
author | Pankaj Raghav <dev@pankajraghav.com> | 2023-04-28 14:06:26 +0200 |
---|---|---|
committer | Jelle Raaijmakers <jelle@gmta.nl> | 2023-05-07 21:16:41 +0200 |
commit | e5cc78e9db15fbedd67a3248dc637e55e59022b5 (patch) | |
tree | 370f46dfaf754127dfd9c32bf53a1177ed36d136 /Kernel/Interrupts | |
parent | b5e593d0e7337efa0810063aec43256913734cc0 (diff) | |
download | serenity-e5cc78e9db15fbedd67a3248dc637e55e59022b5.zip |
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.
Diffstat (limited to 'Kernel/Interrupts')
-rw-r--r-- | Kernel/Interrupts/GenericInterruptHandler.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Kernel/Interrupts/GenericInterruptHandler.h b/Kernel/Interrupts/GenericInterruptHandler.h index a7000b7e45..cb2e492d5e 100644 --- a/Kernel/Interrupts/GenericInterruptHandler.h +++ b/Kernel/Interrupts/GenericInterruptHandler.h @@ -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; |