From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 8BB478F4A; Sun, 13 Jul 2025 14:20:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752416403; cv=none; b=clcHAM2S/slyI+BJachUSJsz+xeBVRq+JgfrL/ma4LLVal/sceRAjdd9dqkAahvbyNRautMhhk9S6vGF2zKqBaJduzaTEmBrjXAgQW8P3+yN/5cLfeUzUqLv7Fvyrjt2f4FwlsmR39mJT7MHNM5LOd+idhR0Cf8ByWE3jPE89RE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752416403; c=relaxed/simple; bh=X+GeHH8pfuXrXmc3cWrR2M+jAONYM1dPj8QJJmReTok=; h=Mime-Version:Content-Type:Date:Message-Id:Subject:Cc:To:From: References:In-Reply-To; b=YTDtzuqD9oL+eY0wCJC3masKH0rVckVi5zpg5KqXRimlLqRa0UQyLlvkRXPVdEOav9th8WEAolbGdBOtPov/Tejuh3QyN+9XV+zqPuV6cc3a9l8kZImn5KgHm7G+p+ascrBPqvjlfq3L726kuUWpc5EZhLS9MmldYngLi4UMYsk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=aAXLy5HM; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="aAXLy5HM" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 07F06C4CEE3; Sun, 13 Jul 2025 14:19:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1752416403; bh=X+GeHH8pfuXrXmc3cWrR2M+jAONYM1dPj8QJJmReTok=; h=Date:Subject:Cc:To:From:References:In-Reply-To:From; b=aAXLy5HMoJAhsskfrtY9/IXAayWIorkhguUylqw8bgYt7FDVjAzX94Xpq03FY3IxX DAyNDFYQurbLYddlKN7Nhno6MbXHpKOVBRMbGrqNkmzkX9U6KQ9ufOej0mPyKD6xhU mPLtR+D6NDGOhpuRTxv8Kl8llr2a3zfcsiVpup0vh34ESZCwy0CzHGPWsgHAyeXMy9 0gCBUECGilc9aFueW/YcE/CKj58eLA+d61LPYBx5t609ghjdX2YauTaZ7Qc3taRHWE 25toDZTtOLXhMjFbc4h3sCnW8gDwdSvRg+GHyORXCMUciudx87waiB2wEtfAK/PLOb oECmyUwfI1gPw== Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Sun, 13 Jul 2025 16:19:58 +0200 Message-Id: Subject: Re: [PATCH v6 3/6] rust: irq: add support for non-threaded IRQs and handlers Cc: "Benno Lossin" , "Miguel Ojeda" , "Alex Gaynor" , "Boqun Feng" , "Gary Guo" , =?utf-8?q?Bj=C3=B6rn_Roy_Baron?= , "Andreas Hindborg" , "Alice Ryhl" , "Trevor Gross" , "Greg Kroah-Hartman" , "Rafael J. Wysocki" , "Thomas Gleixner" , "Bjorn Helgaas" , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , , , To: "Daniel Almeida" From: "Danilo Krummrich" References: <20250703-topics-tyr-request_irq-v6-0-74103bdc7c52@collabora.com> <20250703-topics-tyr-request_irq-v6-3-74103bdc7c52@collabora.com> In-Reply-To: On Sun Jul 13, 2025 at 4:09 PM CEST, Daniel Almeida wrote: > On a second look, I wonder how useful this will be. > > fn handle(&self, dev: &Device) -> IrqReturn > > Sorry for borrowing this terminology, but here we offer Device, wh= ile I > suspect that most drivers will be looking for the most derived Device typ= e > instead. So for drm drivers this will be drm::Device, for example, not th= e base > dev::Device type. I assume that this pattern will hold for other subsyste= ms as > well. > > Which brings me to my second point: drivers can store an ARef on > the handler itself, and I assume that the same will be possible in other > subsystems. Well, the whole point is that you can use a &Device to directly acce= ss device resources without any overhead, i.e. fn handle(&self, dev: &Device) -> IrqReturn { let io =3D self.iomem.access(dev); io.write32(...); }