From 666990fbcb5fe3611577e23fd181e1e9b9e1219c Mon Sep 17 00:00:00 2001 From: Liav A Date: Sun, 8 Mar 2020 02:35:57 +0200 Subject: 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. --- Kernel/Interrupts/SpuriousInterruptHandler.cpp | 6 ++++++ Kernel/Interrupts/SpuriousInterruptHandler.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'Kernel/Interrupts') 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(); -- cgit v1.2.3