Re: [PATCH] rust: irq: add &Device<Bound> argument to irq callbacks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 11, 2025 at 2:49 AM Daniel Almeida
<daniel.almeida@xxxxxxxxxxxxx> wrote:
>
>
>
> > On 21 Jul 2025, at 16:33, Alice Ryhl <aliceryhl@xxxxxxxxxx> wrote:
> >
> > On Mon, Jul 21, 2025 at 9:14 PM Daniel Almeida
> > <daniel.almeida@xxxxxxxxxxxxx> wrote:
> >>
> >> Alice,
> >>
> >>> On 21 Jul 2025, at 11:38, Alice Ryhl <aliceryhl@xxxxxxxxxx> wrote:
> >>>
> >>> When working with a bus device, many operations are only possible while
> >>> the device is still bound. The &Device<Bound> type represents a proof in
> >>> the type system that you are in a scope where the device is guaranteed
> >>> to still be bound. Since we deregister irq callbacks when unbinding a
> >>> device, if an irq callback is running, that implies that the device has
> >>> not yet been unbound.
> >>>
> >>> To allow drivers to take advantage of that, add an additional argument
> >>> to irq callbacks.
> >>>
> >>> Signed-off-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>
> >>> ---
> >>> This patch is a follow-up to Daniel's irq series [1] that adds a
> >>> &Device<Bound> argument to all irq callbacks. This allows you to use
> >>> operations that are only safe on a bound device inside an irq callback.
> >>>
> >>> The patch is otherwise based on top of driver-core-next.
> >>>
> >>> [1]: https://lore.kernel.org/r/20250715-topics-tyr-request_irq2-v7-0-d469c0f37c07@xxxxxxxxxxxxx
> >>
> >> I am having a hard time applying this locally.
> >
> > Your irq series currently doesn't apply cleanly on top of
> > driver-core-next and requires resolving a minor conflict. You can find
> > the commits here:
> > https://github.com/Darksonn/linux/commits/sent/20250721-irq-bound-device-c9fdbfdd8cd9-v1/
>
> Ah, we’ve already discussed this, it seems.

My suggestion is that you pull the tag I shared and cherry-pick it from there.

Alice





[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux