[PATCH v3 5/5] gpu: nova-core: pass WPR metadata ownership to FmcBootArgs

From: Eliot Courtney

Date: Fri Jul 24 2026 - 02:58:31 EST


`FmcBootArgs` logically owns this, so pass ownership to it instead of
storing a reference.

Signed-off-by: Eliot Courtney <ecourtney@xxxxxxxxxx>
---
drivers/gpu/nova-core/fsp.rs | 4 ++--
drivers/gpu/nova-core/gsp/hal/gh100.rs | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/nova-core/fsp.rs b/drivers/gpu/nova-core/fsp.rs
index 48438ba21b91..67de54fbd008 100644
--- a/drivers/gpu/nova-core/fsp.rs
+++ b/drivers/gpu/nova-core/fsp.rs
@@ -208,7 +208,7 @@ pub(crate) struct FmcBootArgs<'a> {
fmc_boot_params: Coherent<GspFmcBootParams>,
resume: bool,
// Additional dependencies required to be kept alive for FMC boot.
- _wpr_meta: &'a Coherent<GspFwWprMeta>,
+ _wpr_meta: Coherent<GspFwWprMeta>,
_libos: &'a Coherent<[LibosMemoryRegionInitArgument]>,
}

@@ -218,7 +218,7 @@ impl<'a> FmcBootArgs<'a> {
pub(crate) fn new(
dev: &device::Device<device::Bound>,
chipset: Chipset,
- wpr_meta: &'a Coherent<GspFwWprMeta>,
+ wpr_meta: Coherent<GspFwWprMeta>,
libos: &'a Coherent<[LibosMemoryRegionInitArgument]>,
resume: bool,
) -> Result<Self> {
diff --git a/drivers/gpu/nova-core/gsp/hal/gh100.rs b/drivers/gpu/nova-core/gsp/hal/gh100.rs
index 358dc2f25e26..f7e7da62ad9c 100644
--- a/drivers/gpu/nova-core/gsp/hal/gh100.rs
+++ b/drivers/gpu/nova-core/gsp/hal/gh100.rs
@@ -156,15 +156,15 @@ fn boot(

let wpr_meta =
Coherent::init(dev, GFP_KERNEL, GspFwWprMeta::from_sizes(gsp_fw, &fb_sizes))?;
- let args = FmcBootArgs::new(dev, chipset, &wpr_meta, &gsp.libos, false)?;
+ let args = FmcBootArgs::new(dev, chipset, wpr_meta, &gsp.libos, false)?;

let unload_bundle = crate::gsp::UnloadBundle(
KBox::new(FspUnloadBundle, GFP_KERNEL)? as KBox<dyn UnloadBundle>
);

// Wait for the GSP RISC-V core to halt in case of error. We create this guard after `args`
- // to make sure that boot args are kept alive until halt, in case they are still being
- // accessed.
+ // to make sure that the boot args and the WPR metadata they own are kept alive until halt,
+ // in case they are still being accessed.
let mut unload_guard =
ScopeGuard::new_with_data((unload_bundle, ctx), |(unload_bundle, ctx)| {
let _ = unload_bundle.0.run(ctx);

--
2.55.0