]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
rust: irq: add irq module
authorDaniel Almeida <daniel.almeida@collabora.com>
Mon, 11 Aug 2025 16:03:39 +0000 (13:03 -0300)
committerDanilo Krummrich <dakr@kernel.org>
Tue, 12 Aug 2025 17:39:45 +0000 (19:39 +0200)
Add the IRQ module. Future patches will then introduce support for IRQ
registrations and handlers.

Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Tested-by: Joel Fernandes <joelagnelf@nvidia.com>
Tested-by: Dirk Behme <dirk.behme@de.bosch.com>
Signed-off-by: Daniel Almeida <daniel.almeida@collabora.com>
Link: https://lore.kernel.org/r/20250811-topics-tyr-request_irq2-v9-1-0485dcd9bcbf@collabora.com
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
rust/kernel/irq.rs [new file with mode: 0644]
rust/kernel/lib.rs

diff --git a/rust/kernel/irq.rs b/rust/kernel/irq.rs
new file mode 100644 (file)
index 0000000..fae7b15
--- /dev/null
@@ -0,0 +1,11 @@
+// SPDX-License-Identifier: GPL-2.0
+
+//! IRQ abstractions.
+//!
+//! An IRQ is an interrupt request from a device. It is used to get the CPU's
+//! attention so it can service a hardware event in a timely manner.
+//!
+//! The current abstractions handle IRQ requests and handlers, i.e.: it allows
+//! drivers to register a handler for a given IRQ line.
+//!
+//! C header: [`include/linux/device.h`](srctree/include/linux/interrupt.h)
index ed53169e795c0badf548025a57f946fa18bc73e3..f8db761c5c95fc66e4c55f539b17fca613161ada 100644 (file)
@@ -92,6 +92,7 @@ pub mod fs;
 pub mod init;
 pub mod io;
 pub mod ioctl;
+pub mod irq;
 pub mod jump_label;
 #[cfg(CONFIG_KUNIT)]
 pub mod kunit;