summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorDanilo Krummrich <dakr@kernel.org>2026-07-19 17:36:05 +0200
committerDanilo Krummrich <dakr@kernel.org>2026-08-04 23:30:34 +0200
commit98c63ce4d7606b2362d8702f159b07f77f75547e (patch)
tree6d4b6637f5f89a402a21f984ec39ee9fc1279526 /tools/perf/scripts/python/stackcollapse.py
parent928369abdd9bf21da698b86d99a7eca2a74c9bed (diff)
rust: irq: make Registration compatible with lifetime-bound drivers
Adapt the IRQ registration to work with the Higher-Ranked Lifetime Types (HRT) device driver architecture introduced in commit 2c7c65933600 ("Merge patch series "rust: device: Higher-Ranked Lifetime Types for device drivers""). With HRT, driver structs carry a lifetime parameter tied to the device binding scope, allowing device resources such as pci::Bar<'bar> to be held directly rather than through Devres indirection. However, the IRQ abstraction required Handler: Sync + 'static, preventing handlers from embedding lifetime-parameterized resources. Remove the 'static bound from Handler and ThreadedHandler and replace the Devres<RegistrationInner> indirection with direct request_irq() / free_irq() calls in the constructor and PinnedDrop. Registration<'a, T> stores the IrqRequest<'a>, which structurally ties it to the device binding scope. Also remove the &Device<Bound> parameter from the handler callbacks, since handlers that need device access can embed it in their own type. IRQ handlers can now directly own device resources: struct IrqHandler<'irq> { bar: pci::Bar<'irq, BAR_SIZE>, } impl irq::Handler for IrqHandler<'_> { fn handle(&self) -> IrqReturn { let stat = self.bar.read(regs::STAT); ... } } This eliminates the indirection previously required for IRQ handlers to access device resources and aligns with the broader goal of expressing every registration scoped to a driver binding through compile-time lifetime bounds. Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com> Reviewed-by: Gary Guo <gary@garyguo.net> Reviewed-by: Alexandre Courbot <acourbot@nvidia.com> Reviewed-by: Alice Ryhl <aliceryhl@google.com> Link: https://patch.msgid.link/20260719153631.559341-1-dakr@kernel.org Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions