diff options
| author | Danilo Krummrich <dakr@kernel.org> | 2026-08-13 18:52:01 +0200 |
|---|---|---|
| committer | Danilo Krummrich <dakr@kernel.org> | 2026-08-17 01:14:23 +0200 |
| commit | 17d4a399e8b8de0bb7d78cb46f92ffa9d629965d (patch) | |
| tree | 5cbc69ab1125c660c33aa7b857103784cd56d84c /tools/perf/scripts/python/flamegraph.py | |
| parent | d5e81a5650b5258c73768366db123b6d5bc48e32 (diff) | |
rust: pci: convert IrqVectorRegistration to a lifetime-managed owning type
Convert IrqVectorRegistration from a devres-managed internal type to a
lifetime-annotated type that owns the PCI interrupt vector allocation.
Dropping it frees the vectors.
IrqVector gains a reference to the IrqVectorRegistration it was derived
from. Since index() borrows the registration, the compiler prevents the
allocation from being dropped while any IrqVector (and hence any
irq::Registration built from it) is still live.
alloc_irq_vectors() returns IrqVectorRegistration<'_> directly, giving
drivers explicit control over the allocation lifetime, which is needed
by net and block drivers that re-allocate vectors at runtime, e.g.
during queue reconfiguration or device recovery.
Tested-by: John Hubbard <jhubbard@nvidia.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Link: https://patch.msgid.link/20260813165234.620555-2-dakr@kernel.org
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/flamegraph.py')
0 files changed, 0 insertions, 0 deletions
