From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B58061EDA09 for ; Tue, 15 Jul 2025 12:33:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752582808; cv=none; b=HbJ+hWy/vmDeu7BNPgVX0CA3dZKGSdCD6CrvDgm5VVdh58FlAKM/JoWgeFxOnwEU6NZWrXj3i3Avx9PC1WjAsq8jrD/AHhql9t6d+KnMvkjiHe/Vv9RIcOo6CCa1f6oX3u2OCWCwCqaGpM03Z7TyKvxKL5RkRj75avLX8jVRsbw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752582808; c=relaxed/simple; bh=I6i/EyKtu9kTeHVvimXGCXVSzCMMytdEC5VDydgz9wc=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=pMbDfmdNhlYiU2LzcLJUkRsS/Ad4ZQ4RU9MRHBrRNr5VLqpTb38HGEdvvzed8hfOcnMQ3Sf61F3KzObuyKexuRYVVixRwGkobhOKnsoSzXtMQZN6bi9z9IKZ+dHD6Yei7veHdkEAWAM1ut0C0rbjVDgE/cSjIEB09lk3vQ8eFic= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=YSvGlIdR; arc=none smtp.client-ip=209.85.128.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="YSvGlIdR" Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-456108bf94bso17391845e9.0 for ; Tue, 15 Jul 2025 05:33:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1752582805; x=1753187605; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=YxJvXzNAx/wxcXJMnx0rqVWrH9gKkRzFrMsFLcWu9f4=; b=YSvGlIdRCBGTQXYI7PX2O77nbnREyCrdJA5UZqHUDJICCufmUytBCPjNG39NEzMfwe PyTv8aKS4S80oBpns4XDobfg6QyL9cLVLZHbs0IvkK0cpBoF5Et+sDkIxKSicTMt/exK kleA8PHdJNCOdDGUM9Lyma6l2mtUVjXoNEpdyF9t0mIDxZlPjtxdQzKoRfms66NL3ghp ujzYoFHyxTUOL7k8yfzwShzbrUxou5pLXvmztWdqDf0B2FQoBSqerGboIqXxSUpdpqf4 Zv9c1wwKW31sfZQi5EhSmBl4XQbgY/ywnBG7GzFSuRkTc2wx0VY5Wd80/cqfLnLXpb5o yOIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1752582805; x=1753187605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YxJvXzNAx/wxcXJMnx0rqVWrH9gKkRzFrMsFLcWu9f4=; b=gzwL1wSrmILnuc6iRrheAd1YBySi1Gtjsw7lioL6QkPtaY296uksn3Y1wpzRgCzcDr rEZBe8z9e6vq+uHtZHmuL/wn+Np9pX08worNcq4AUuazbbr3cTMOJHyETf/NIJ424FF2 DZqZOOaY3WjU3iA5XLfZBtxOU9lmccfGOu4hbvJg4K+VbjedgvOlfbK50D+p8gA+dI9F NJJV7wqXc0TMf+Ncb6lHK3sLMBy4bhV8X9LX9fmj0VoCw7IHhoidk1MQEUPBDdBA/ZsY f4yu9fPBuvdCId3lyOjCaUryMbZjWfNKhlnl8dIawViFo9J5TnMBzWxj2BJm+bbt1vpV Ilng== X-Forwarded-Encrypted: i=1; AJvYcCUktEZswyMDQi0uDEHbl4fsGC/EINM0BC5E6uWDyHCfM1yrqXL+0iXeoUouUMbKlQoR8PICy/hxSF0+oaOSMQ==@vger.kernel.org X-Gm-Message-State: AOJu0YwUNUgoCttDo5iFw0soeLx6GXHPKutNSTLede/53uLhE0VQ3FUE hXvwD0EOjeynGjfLCBg2+VozxKlv6zpxIJNZAqVdJmg41A3wMxYNHYmVnmSawVARDkF+nihXJID 0RaxkxVbsSVFD5ooiizXyAwaxM5Luus2tVdKEhYlT X-Gm-Gg: ASbGncvEbeaoPbg1stZB7P7kGkZu/g5epAJHli07dq6As6LerB3Byc0r87rMDoPXM15 K9c57QUPcrU0j1NKm/Xn4Y+7fsGYIhz8rrPswik/f2eNYiFVvN+mBa3OqbhRRhLywlBJujTdObA 0rD4gNTilJHkX4SCY1yvTrgRjsp3eKAD8EBg3M+z5PL+nAGqu4M4q2vvN1Zde/YidjbUjw3X0gW 3Q1UKM= X-Google-Smtp-Source: AGHT+IHsSxt/ccfq3IS8RwrKiSzpaPPIWfXeSHZBLdgXWILdsWaDM5Ybin3kG0LyFIgWQPN/jFP74RS5jphBMvGLCBw= X-Received: by 2002:a05:6000:1a86:b0:3a4:eda1:6c39 with SMTP id ffacd0b85a97d-3b5f2dc216dmr11909192f8f.13.1752582804862; Tue, 15 Jul 2025 05:33:24 -0700 (PDT) Precedence: bulk X-Mailing-List: rust-for-linux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20250703-topics-tyr-request_irq-v6-0-74103bdc7c52@collabora.com> <20250703-topics-tyr-request_irq-v6-3-74103bdc7c52@collabora.com> In-Reply-To: From: Alice Ryhl Date: Tue, 15 Jul 2025 14:33:11 +0200 X-Gm-Features: Ac12FXzafqL5CgtuWo3knu-1K9vyMTCNfAik34wqBKJ35Mxv3Xe2G9Y-3oofZaA Message-ID: Subject: Re: [PATCH v6 3/6] rust: irq: add support for non-threaded IRQs and handlers To: Daniel Almeida , Danilo Krummrich Cc: Benno Lossin , Miguel Ojeda , Alex Gaynor , Boqun Feng , Gary Guo , =?UTF-8?Q?Bj=C3=B6rn_Roy_Baron?= , Andreas Hindborg , Trevor Gross , Greg Kroah-Hartman , "Rafael J. Wysocki" , Thomas Gleixner , Bjorn Helgaas , =?UTF-8?Q?Krzysztof_Wilczy=C5=84ski?= , linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org, linux-pci@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Jul 14, 2025 at 5:13=E2=80=AFPM Daniel Almeida wrote: > > Hi, > > > > >>> > >>> (2) It is guaranteed that the device pointer is valid because (1) gu= arantees > >>> it's even bound and because Devres itself has= a > >>> reference count. > >> > >> Yeah but I would find it much more natural (and also useful in other > >> circumstances) if `Devres` would give you access to `Device` (at > >> least the `Normal` type state). > > > > If we use container_of!() instead or just pass the address of Self (i.e= . > > Registration) to request_irq() instead, > > > Boqun, Benno, are you ok with passing the address of Registration as t= he cookie? > > Recall that this was a change requested in v4, so I am checking whether w= e are > all on the same page before going back to that. > > See [0], i.e.: > [0] https://lore.kernel.org/all/aFq3P_4XgP0dUrAS@Mac.home/ After discussing this, Daniel and I agreed that I will implement the change adding a Device argument to the callback. I will be sending a patch adding it separately as a follow-up to Daniel's work. Alice