From: Laura Nao <laura.nao@collabora.com>
To: ewan.chorynski@ik.me
Cc: a.hindborg@kernel.org, acourbot@nvidia.com, airlied@gmail.com,
aliceryhl@google.com, bjorn3_gh@protonmail.com, boqun@kernel.org,
dakr@kernel.org, daniel.almeida@collabora.com,
deborah.brouwer@collabora.com, dri-devel@lists.freedesktop.org,
gary@garyguo.net, kernel@collabora.com, laura.nao@collabora.com,
linux-kernel@vger.kernel.org, lossin@kernel.org,
ojeda@kernel.org, rust-for-linux@vger.kernel.org,
simona@ffwll.ch, tamird@kernel.org, tmgross@umich.edu,
work@onurozkan.dev
Subject: Re: [PATCH v2] drm/tyr: add Job IRQ handling
Date: Wed, 29 Jul 2026 15:25:22 +0200 [thread overview]
Message-ID: <20260729132522.478273-1-laura.nao@collabora.com> (raw)
In-Reply-To: <9cf1107a-3dfd-43a6-9f25-d8e01595c9e3@mail.infomaniak.com>
Hi Ewan,
On 7/29/26 14:12, Ewan Chorynski wrote:
> On Wed, Jul 29, 2026 at 11:58:29AM +0200, Laura Nao wrote:
>> [...]
>> +
>> +impl<T: TyrIrqTrait> TyrIrq<T> {
>> + pub(crate) fn request<'a>(
>> + pdev: &'a platform::Device<Bound>,
>> + name: &'static CStr,
>> + irq: T,
>> + ) -> Result<impl PinInit<ThreadedRegistration<'a, Self>, Error> + 'a>
>> + where
>> + T: 'a,
>> + {
>> + let handler = try_pin_init!(Self {
>> + irq,
>> + _pin: PhantomPinned,
>> + });
>> +
>> + // SAFETY: The resulting `PinInit` is not leaked, it is consumed by the caller to
>> + // initialize a pinned `ThreadedRegistration`.
>> + Ok(unsafe { pdev.request_threaded_irq_by_name(Flags::SHARED, name, name, handler) })
>
> I think your `request` function should be unsafe with the same
> requirements as `request_threaded_irq_by_name`, otherwise how do you
> guarantee that this safety justification holds ?
>
Oh right, I somehow forgot to propagate the safety requirement up the
call chain. That means job_irq_init() also needs to become unsafe, as
it's just a wrapper around request().
I'll address this in the next revision.
Thanks for the heads up!
Best,
Laura
>> + }
>> +}
>> [...]
next prev parent reply other threads:[~2026-07-29 13:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-29 9:58 Laura Nao
2026-07-29 12:12 ` Ewan Chorynski
2026-07-29 13:25 ` Laura Nao [this message]
2026-07-29 16:51 ` Onur Özkan
2026-07-30 9:45 ` Laura Nao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260729132522.478273-1-laura.nao@collabora.com \
--to=laura.nao@collabora.com \
--cc=a.hindborg@kernel.org \
--cc=acourbot@nvidia.com \
--cc=airlied@gmail.com \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=dakr@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=deborah.brouwer@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=ewan.chorynski@ik.me \
--cc=gary@garyguo.net \
--cc=kernel@collabora.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=simona@ffwll.ch \
--cc=tamird@kernel.org \
--cc=tmgross@umich.edu \
--cc=work@onurozkan.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®