summaryrefslogtreecommitdiff
path: root/Kernel
diff options
context:
space:
mode:
authorLiav A <liavalb@gmail.com>2021-06-05 07:52:35 +0300
committerAndreas Kling <kling@serenityos.org>2021-06-17 16:53:25 +0200
commitc802b1a3633be6828d6ccb66dd9355e5044e9735 (patch)
treeb1f51834c7b94d65d60ddb6dd25d4663a48b7aa3 /Kernel
parent030999d26976972c676b38a11bcd7674cb3a5e13 (diff)
downloadserenity-c802b1a3633be6828d6ccb66dd9355e5044e9735.zip
Kernel/Interrupts: Add sensible purposes to VirtIO and USB devices
When we enumerate the interrupt handlers, it's a good idea to show a meaningful name to the user instead of "IRQ Handler".
Diffstat (limited to 'Kernel')
-rw-r--r--Kernel/Devices/USB/UHCIController.h2
-rw-r--r--Kernel/VirtIO/VirtIOConsole.h2
-rw-r--r--Kernel/VirtIO/VirtIORNG.h1
3 files changed, 5 insertions, 0 deletions
diff --git a/Kernel/Devices/USB/UHCIController.h b/Kernel/Devices/USB/UHCIController.h
index 5c399db5db..39ba8757d8 100644
--- a/Kernel/Devices/USB/UHCIController.h
+++ b/Kernel/Devices/USB/UHCIController.h
@@ -28,6 +28,8 @@ public:
static UHCIController& the();
virtual ~UHCIController() override;
+ virtual const char* purpose() const override { return "UHCI"; }
+
void reset();
void stop();
void start();
diff --git a/Kernel/VirtIO/VirtIOConsole.h b/Kernel/VirtIO/VirtIOConsole.h
index c3149dab65..d71cfe5209 100644
--- a/Kernel/VirtIO/VirtIOConsole.h
+++ b/Kernel/VirtIO/VirtIOConsole.h
@@ -25,6 +25,8 @@ public:
VirtIOConsole(PCI::Address);
virtual ~VirtIOConsole() override;
+ virtual const char* purpose() const override { return class_name(); }
+
private:
constexpr static size_t RINGBUFFER_SIZE = 2 * PAGE_SIZE;
virtual const char* class_name() const override { return m_class_name.characters(); }
diff --git a/Kernel/VirtIO/VirtIORNG.h b/Kernel/VirtIO/VirtIORNG.h
index 6f083fa40e..720b044dc4 100644
--- a/Kernel/VirtIO/VirtIORNG.h
+++ b/Kernel/VirtIO/VirtIORNG.h
@@ -17,6 +17,7 @@ namespace Kernel {
class VirtIORNG final : public CharacterDevice
, public VirtIODevice {
public:
+ virtual const char* purpose() const override { return class_name(); }
virtual const char* class_name() const override { return m_class_name.characters(); }
virtual bool can_read(const FileDescription&, size_t) const override { return false; }