summaryrefslogtreecommitdiff
path: root/Kernel/Interrupts/InterruptManagement.cpp
diff options
context:
space:
mode:
authorLiav A <liavalb@gmail.com>2020-03-08 12:47:33 +0200
committerAndreas Kling <kling@serenityos.org>2020-03-24 16:15:33 +0100
commitf86be46c989499562b0b9ab9cd194e16dbc5bb36 (patch)
treea96a8328a29fa3e10e068b73d91176706fcaafee /Kernel/Interrupts/InterruptManagement.cpp
parent666990fbcb5fe3611577e23fd181e1e9b9e1219c (diff)
downloadserenity-f86be46c989499562b0b9ab9cd194e16dbc5bb36.zip
Kernel: Abstract IRQ controller handling from Interrupt handlers
Now we don't send raw numbers, but we let the IRQController object to figure out the correct IRQ number. This helps in a situation when we have 2 or more IOAPICs, so if IOAPIC 1 is assigned for IRQs 0-23 and IOAPIC 2 is assigned for IRQs 24-47, if an IRQHandler of IRQ 25 invokes disable() for example, it will call his responsible IRQController (IOAPIC 2), and the IRQController will subtract the IRQ number with his assigned offset, and the result is that the second redirection entry in IOAPIC 2 will be masked.
Diffstat (limited to 'Kernel/Interrupts/InterruptManagement.cpp')
-rw-r--r--Kernel/Interrupts/InterruptManagement.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Interrupts/InterruptManagement.cpp b/Kernel/Interrupts/InterruptManagement.cpp
index eb539b3de0..905551457a 100644
--- a/Kernel/Interrupts/InterruptManagement.cpp
+++ b/Kernel/Interrupts/InterruptManagement.cpp
@@ -114,7 +114,7 @@ RefPtr<IRQController> InterruptManagement::get_responsible_irq_controller(u8 int
return m_interrupt_controllers[0];
}
for (auto irq_controller : m_interrupt_controllers) {
- if (irq_controller->get_gsi_base() <= interrupt_vector)
+ if (irq_controller->gsi_base() <= interrupt_vector)
if (!irq_controller->is_hard_disabled())
return irq_controller;
}