From: sashiko-bot@kernel.org
To: "Alexandre Courbot" <acourbot@nvidia.com>
Cc: ojeda@kernel.org, dri-devel@lists.freedesktop.org,
"Danilo Krummrich" <dakr@kernel.org>
Subject: Re: [PATCH v2 02/13] gpu: nova-core: gsp: sequencer: do not store sequence into GspSequencer
Date: Tue, 23 Jun 2026 20:46:42 +0000 [thread overview]
Message-ID: <20260623204642.671C31F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260622-nova-bootcontext-v2-2-0ddeafc06f5d@nvidia.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] This problem wasn't introduced by this patch, but the iterator silently terminates on command parsing errors, causing the GSP boot sequence to incorrectly report success instead of aborting.
--
commit 67a42d6a50b9bd7a1977aebced3e9453d53bb90e
Author: Alexandre Courbot <acourbot@nvidia.com>
gpu: nova-core: gsp: sequencer: do not store sequence into GspSequencer
This commit refactors the GSP sequencer by moving the command sequence
data out of the GspSequencer struct and instead passing it directly when
creating the iterator. This resolves borrow-checker limitations and allows
for future mutable borrows within the boot context.
> diff --git a/drivers/gpu/nova-core/gsp/sequencer.rs b/drivers/gpu/nova-core/gsp/sequencer.rs
> index 0da3c35318866..b5e049f76c282 100644
> --- a/drivers/gpu/nova-core/gsp/sequencer.rs
> +++ b/drivers/gpu/nova-core/gsp/sequencer.rs
[ ... ]
> @@ -355,7 +351,6 @@ pub(crate) fn run(
> };
>
> let sequencer = GspSequencer {
> - seq_info,
> bar: ctx.bar,
> sec2_falcon: ctx.sec2_falcon,
> gsp_falcon: ctx.gsp_falcon,
> @@ -366,14 +361,14 @@ pub(crate) fn run(
>
> dev_dbg!(sequencer.dev, "Running CPU Sequencer commands\n");
>
> - for cmd_result in sequencer.iter() {
> + for cmd_result in GspSeqIter::new(&seq_info, sequencer.dev) {
[Severity: High]
This isn't a bug introduced by this patch, but doesn't the iterator
silently terminate on command parsing errors, causing the GSP boot sequence
to incorrectly report success instead of aborting?
Looking at GspSeqIter::next(), when a command fails to parse, the error
is swallowed and translated to None:
drivers/gpu/nova-core/gsp/sequencer.rs:GspSeqIter::next() {
...
cmd_result.map_or_else(
|_err| {
dev_err!(self.dev, "Error parsing command at offset {}\n", offset);
None
},
...
}
Returning None signals normal exhaustion of the iterator. This causes the
loop here in GspSequencer::run() to cleanly exit without ever hitting the
Err(e) match arm below.
Consequently, GspSequencer::run() will incorrectly log success and return
Ok(()), completely masking the hardware initialization failure and leaving
the hardware in a malformed state.
> match cmd_result {
> Ok(cmd) => cmd.run(&sequencer)?,
> Err(e) => {
> dev_err!(
> sequencer.dev,
> "Error running command at index {}\n",
> - sequencer.seq_info.cmd_index
> + seq_info.cmd_index
> );
> return Err(e);
> }
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260622-nova-bootcontext-v2-0-0ddeafc06f5d@nvidia.com?part=2
next prev parent reply other threads:[~2026-06-23 20:46 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-22 7:10 [PATCH v2 00/13] gpu: nova-core: consolidate and streamline GSP boot process Alexandre Courbot
2026-06-22 7:10 ` [PATCH v2 01/13] gpu: nova-core: gsp: sequencer: use GspBootContext Alexandre Courbot
2026-06-22 7:10 ` [PATCH v2 02/13] gpu: nova-core: gsp: sequencer: do not store sequence into GspSequencer Alexandre Courbot
2026-06-23 20:46 ` sashiko-bot [this message]
2026-06-22 7:10 ` [PATCH v2 03/13] gpu: nova-core: gsp: move boot code into local closure Alexandre Courbot
2026-06-22 7:59 ` Eliot Courtney
2026-06-22 18:41 ` John Hubbard
2026-06-22 7:10 ` [PATCH v2 04/13] gpu: nova-core: gsp: replace BootUnloadGuard with local handler Alexandre Courbot
2026-06-22 7:10 ` [PATCH v2 05/13] gpu: nova-core: gsp: move unload bundle error handling to Gsp::boot Alexandre Courbot
2026-06-23 20:59 ` sashiko-bot
2026-06-22 7:10 ` [PATCH v2 06/13] gpu: nova-core: gsp: make unload take GspBootContext Alexandre Courbot
2026-06-23 21:11 ` sashiko-bot
2026-06-22 7:10 ` [PATCH v2 07/13] gpu: nova-core: gsp: fold TU102 unload bundle construction into HAL method Alexandre Courbot
2026-06-22 7:10 ` [PATCH v2 08/13] gpu: nova-core: gsp: turn FWSEC execution " Alexandre Courbot
2026-06-22 7:10 ` [PATCH v2 09/13] gpu: nova-core: gsp: make use of FWSEC bootloader a property of the TU102 HAL Alexandre Courbot
2026-06-22 7:10 ` [PATCH v2 10/13] gpu: nova-core: introduce GspBootMethod Alexandre Courbot
2026-06-22 7:10 ` [PATCH v2 11/13] gpu: nova-core: avoid repeated calls to pci::Device::as_ref Alexandre Courbot
2026-06-22 7:10 ` [PATCH v2 12/13] gpu: nova-core: gsp: pass GspBootContext mutably Alexandre Courbot
2026-06-22 7:10 ` [PATCH v2 13/13] gpu: nova-core: store Fsp instance in Gpu Alexandre Courbot
2026-06-22 22:28 ` John Hubbard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260623204642.671C31F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=acourbot@nvidia.com \
--cc=dakr@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=ojeda@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.