Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] The GspSequencer struct was not updated with separate context and GPU lifetimes, leaving it vulnerable to the exact covariance issue this commit aims to fix. --
--- Patch [12]: [PATCH v5 12/13] gpu: nova-core: gsp: separate context and GPU lifetimes in GspBootContext --- commit 25c80f140498d9178aab39d3a011facb7416a203 Author: Alexandre Courbot <[email protected]> gpu: nova-core: gsp: separate context and GPU lifetimes in GspBootContext This commit splits the lifetimes in GspBootContext into separate context and GPU lifetimes to allow mutable references to GPU subdevices. This distinction prepares the context for holding mutable borrows of Falcon instances. > 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> { [Severity: Low] Should GspSequencer also be updated to use separate 'ctx and 'gpu lifetimes? The commit splits lifetimes in GspBootContext because holding mutable references to GPU subdevices requires invariant lifetimes. However, the GspSequencer struct definition still uses a single lifetime for its Falcon references: pub(crate) struct GspSequencer<'a> { bar: Bar0<'a>, sec2_falcon: &'a Falcon<'a, Sec2>, gsp_falcon: &'a Falcon<'a, Gsp>, ... Will this cause similar compilation errors for GspSequencer when the Falcon references are eventually made mutable? > pub(crate) fn run( > cmdq: &Cmdq, > - ctx: &'a GspBootContext<'_>, > + ctx: &'a GspBootContext<'_, '_>, > libos_dma_handle: u64, > bootloader_app_version: u32, > ) -> Result { -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=12
