From 528aef3a4bdd85137de9ec76bd02eacdf8160bb5 Mon Sep 17 00:00:00 2001 From: Eliot Courtney Date: Tue, 4 Aug 2026 14:41:16 +0900 Subject: [PATCH] gpu: nova-core: pass WPR metadata ownership to FmcBootArgs `FmcBootArgs` logically owns this, so pass ownership to it instead of storing a reference. Signed-off-by: Eliot Courtney Link: https://patch.msgid.link/20260804-blackwell-fixes-v4-5-ac858b6a1935@nvidia.com Signed-off-by: Alexandre Courbot --- 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 2c9b050f6139..6263277a7614 100644 --- a/drivers/gpu/nova-core/fsp.rs +++ b/drivers/gpu/nova-core/fsp.rs @@ -351,7 +351,7 @@ pub(crate) struct FmcBootArgs<'a> { fmc_boot_params: Coherent, resume: bool, // Additional dependencies required to be kept alive for FMC boot. - _wpr_meta: &'a Coherent, + _wpr_meta: Coherent, _libos: &'a Coherent<[LibosMemoryRegionInitArgument]>, } @@ -361,7 +361,7 @@ impl<'a> FmcBootArgs<'a> { pub(crate) fn new( dev: &device::Device, chipset: Chipset, - wpr_meta: &'a Coherent, + wpr_meta: Coherent, libos: &'a Coherent<[LibosMemoryRegionInitArgument]>, resume: bool, ) -> Result { diff --git a/drivers/gpu/nova-core/gsp/hal/gh100.rs b/drivers/gpu/nova-core/gsp/hal/gh100.rs index be10d278f567..b16c2f6f82a0 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 ); // 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);