Files
erofs-linux/rust/kernel
Danilo Krummrich 89f55d04c6 rust: io: make IoMem and ExclusiveIoMem lifetime-parameterized
Add a lifetime parameter to IoMem<'a, SIZE> and ExclusiveIoMem<'a,
SIZE>, storing a &'a Device<Bound> reference to tie the mapping to the
device's lifetime.

This mirrors the pci::Bar<'a, SIZE> design and enables drivers to hold
I/O memory mappings directly in their HRT private data, tied to the
device lifetime.

IoRequest::iomap_* methods now return the mapping directly instead of
wrapping it in Devres. Callers that need device-managed revocation can
call the new into_devres() method.

Acked-by: Uwe Kleine-König <[email protected]>
Reviewed-by: Eliot Courtney <[email protected]>
Reviewed-by: Greg Kroah-Hartman <[email protected]>
Reviewed-by: Alexandre Courbot <[email protected]>
Reviewed-by: Gary Guo <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Danilo Krummrich <[email protected]>
2026-05-27 16:24:28 +02:00
..
…
…
…
…
…
…
…
2026-04-03 11:57:35 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2026-01-30 05:47:05 +01:00
…