From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 44B851922D3; Mon, 11 Aug 2025 00:32:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.251.105.195 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754872377; cv=none; b=lUiIttY8ogPtUPsd78P68SLGmbpP4A5PEmhYLobINOnigHL5RnZh5iwgC20JfdU2YcA1Jp/lxDOSRt9x8mcAoH5ceRk85M7P+WSMZ+sv90JeHyuz+w26GEGmXquhkIj6fDkl0zoiV8UaaIxz/U3cjrrFsAnWAiXWOK2pbxIyeeM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754872377; c=relaxed/simple; bh=IFTM+cCl1PzcsGLiOvasHfcz6hoVV8pnqOMPQjed5gw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Cf+xpT7xrfBGOWKIhy9dCKkbaxIZLrg2PGURZcr5fXK1WEiVrH/2lwt4OC/CiugeGcahnE4Fe+t/K7nZKlXPpGN2G7wsocUYOWped3LeRg4h8m9QtJjirsa/Lls/KhK4wkr/JYMKpXvTBY5+OKTR5xfO+l21aFEbdR3hIFRLyJ4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=PI7JuRAm; arc=none smtp.client-ip=148.251.105.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="PI7JuRAm" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1754872368; bh=IFTM+cCl1PzcsGLiOvasHfcz6hoVV8pnqOMPQjed5gw=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=PI7JuRAmLjU/TuG6t+mxMhqNSrSmhXepgsHDCdvqlzePZKdDO87FaoDH1HwrYsN6K 4iPktER7Kj8Srt89WuQxE9tpsnp1dMWxPFcHXJ1DznvfRuzYH4ahe9E2NlZwyOeq2P 3xWAJ+79lEhRnj2HWtjzr49lfclsrJTvT6USouWpXiK10zHGjwnkADhESzRW8gVjvN OU+/TppvN4CG+HEUgSelBrPXXZw8CnWsz/ZArRoKV35aPTx3WnrXjcf8kjbWANbUGL Vvq6LeicnhYVld9h6oX8Gce7Q5VFZSZvmZhtxG0rBGI0TwdMDHvbM8SeGf2uuWYjMG j9PrsOHVlizvA== Received: from [192.168.0.23] (unknown [IPv6:2804:14d:72b4:82f6:67c:16ff:fe57:b5a3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: dwlsalmeida) by bali.collaboradmins.com (Postfix) with ESMTPSA id E846F17E090E; Mon, 11 Aug 2025 02:32:43 +0200 (CEST) From: Daniel Almeida Date: Sun, 10 Aug 2025 21:32:14 -0300 Subject: [PATCH v8 1/6] rust: irq: add irq module Precedence: bulk X-Mailing-List: rust-for-linux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20250810-topics-tyr-request_irq2-v8-1-8163f4c4c3a6@collabora.com> References: <20250810-topics-tyr-request_irq2-v8-0-8163f4c4c3a6@collabora.com> In-Reply-To: <20250810-topics-tyr-request_irq2-v8-0-8163f4c4c3a6@collabora.com> To: Miguel Ojeda , Alex Gaynor , Boqun Feng , Gary Guo , =?utf-8?q?Bj=C3=B6rn_Roy_Baron?= , Andreas Hindborg , Alice Ryhl , Trevor Gross , Danilo Krummrich , Greg Kroah-Hartman , "Rafael J. Wysocki" , Thomas Gleixner , Bjorn Helgaas , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Benno Lossin Cc: linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org, linux-pci@vger.kernel.org, Joel Fernandes , Dirk Behme , Daniel Almeida X-Mailer: b4 0.14.2 Add the IRQ module. Future patches will then introduce support for IRQ registrations and handlers. Reviewed-by: Alice Ryhl Tested-by: Joel Fernandes Tested-by: Dirk Behme Signed-off-by: Daniel Almeida --- rust/kernel/irq.rs | 11 +++++++++++ rust/kernel/lib.rs | 1 + 2 files changed, 12 insertions(+) diff --git a/rust/kernel/irq.rs b/rust/kernel/irq.rs new file mode 100644 index 0000000000000000000000000000000000000000..fae7b15effc80c936d6bffbd5b4150000d6c2898 --- /dev/null +++ b/rust/kernel/irq.rs @@ -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) diff --git a/rust/kernel/lib.rs b/rust/kernel/lib.rs index ed53169e795c0badf548025a57f946fa18bc73e3..f8db761c5c95fc66e4c55f539b17fca613161ada 100644 --- a/rust/kernel/lib.rs +++ b/rust/kernel/lib.rs @@ -92,6 +92,7 @@ pub mod init; pub mod io; pub mod ioctl; +pub mod irq; pub mod jump_label; #[cfg(CONFIG_KUNIT)] pub mod kunit; -- 2.50.1