diff options
author | Liav A <liavalb@gmail.com> | 2020-03-08 02:35:57 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-03-24 16:15:33 +0100 |
commit | 666990fbcb5fe3611577e23fd181e1e9b9e1219c (patch) | |
tree | ee0e457ed53ab6d9eeb22b14005cee5e61b0ba58 /Kernel/Interrupts | |
parent | 4cc96a7aa91cf94155924a7915cf33cd578aab59 (diff) | |
download | serenity-666990fbcb5fe3611577e23fd181e1e9b9e1219c.zip |
Kernel: Correct Spurious Interrupt handlers' controller model() method
We don't return blindly the IRQ controller's model(), if the Spurious
IRQ handler is installed in IOAPIC environment, it's misleading to
return "IOAPIC" string since IOAPIC doesn't really handle Spurious
IRQs, therefore we return a "" string.
Diffstat (limited to 'Kernel/Interrupts')
-rw-r--r-- | Kernel/Interrupts/SpuriousInterruptHandler.cpp | 6 | ||||
-rw-r--r-- | Kernel/Interrupts/SpuriousInterruptHandler.h | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/Kernel/Interrupts/SpuriousInterruptHandler.cpp b/Kernel/Interrupts/SpuriousInterruptHandler.cpp index d80ac8fc23..885481f5c3 100644 --- a/Kernel/Interrupts/SpuriousInterruptHandler.cpp +++ b/Kernel/Interrupts/SpuriousInterruptHandler.cpp @@ -81,4 +81,10 @@ void SpuriousInterruptHandler::disable_interrupt_vector() m_responsible_irq_controller->disable(interrupt_number()); } +const char* SpuriousInterruptHandler::controller() const +{ + if (m_responsible_irq_controller->type() == IRQControllerType::i82093AA) + return ""; + return m_responsible_irq_controller->model(); +} } diff --git a/Kernel/Interrupts/SpuriousInterruptHandler.h b/Kernel/Interrupts/SpuriousInterruptHandler.h index 24c24903d6..3eded1cf5b 100644 --- a/Kernel/Interrupts/SpuriousInterruptHandler.h +++ b/Kernel/Interrupts/SpuriousInterruptHandler.h @@ -52,7 +52,7 @@ public: virtual HandlerType type() const override { return HandlerType::SpuriousInterruptHandler; } virtual const char* purpose() const override { return "Spurious Interrupt Handler"; } - virtual const char* controller() const override { return m_responsible_irq_controller->model(); } + virtual const char* controller() const override; private: void enable_interrupt_vector(); |