Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] Incomplete lifetime separation in `GspSequencer` defeats the preparatory purpose of the commit. --
commit e32fe8760a6faf814fee0f0f066cd958f9319386 Author: Alexandre Courbot <[email protected]> gpu: nova-core: gsp: separate context and GPU lifetimes in GspBootContext This commit separates the lifetimes of GPU-bound resources and the context borrowing them in GspBootContext. This distinction is necessary because the context will eventually carry mutable references, making the lifetimes invariant. [ ... ] > diff --git a/drivers/gpu/nova-core/gsp/sequencer.rs > b/drivers/gpu/nova-core/gsp/sequencer.rs > index ddce32cc4e308..422a74f9ecbd5 100644 > --- a/drivers/gpu/nova-core/gsp/sequencer.rs > +++ b/drivers/gpu/nova-core/gsp/sequencer.rs > @@ -335,7 +335,7 @@ fn next(&mut self) -> Option<Self::Item> { > impl<'a> GspSequencer<'a> { > pub(crate) fn run( > cmdq: &Cmdq, > - ctx: &'a GspBootContext<'_>, > + ctx: &'a GspBootContext<'_, '_>, [Severity: Low] Does GspSequencer also need to be updated to use separated lifetimes? Looking at the struct definition for GspSequencer in this file, it still stores the Falcon references using a single 'a lifetime, such as: sec2_falcon: &'a Falcon<'a, Sec2>. While this currently compiles because immutable references are covariant, it recouples the context and GPU lifetimes that were separated in GspBootContext. When the Falcon references are later made mutable as the commit message indicates, they will become invariant. At that point, this conflated lifetime in GspSequencer will cause a compilation error. Should GspSequencer be updated to use 'ctx and 'gpu as well? > libos_dma_handle: u64, > bootloader_app_version: u32, > ) -> Result { -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=12
