diff options
| author | Eliot Courtney <ecourtney@nvidia.com> | 2026-08-04 14:41:16 +0900 |
|---|---|---|
| committer | Alexandre Courbot <acourbot@nvidia.com> | 2026-08-05 14:20:37 +0900 |
| commit | 528aef3a4bdd85137de9ec76bd02eacdf8160bb5 (patch) | |
| tree | 347a5e13f215d3e5a9c841a865214e5f8cb08110 | |
| parent | 6e46097f4d616a0f81083ae2c112efbb1473539e (diff) | |
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 <ecourtney@nvidia.com>
Link: https://patch.msgid.link/20260804-blackwell-fixes-v4-5-ac858b6a1935@nvidia.com
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
| -rw-r--r-- | drivers/gpu/nova-core/fsp.rs | 4 | ||||
| -rw-r--r-- | 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<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]>, } @@ -361,7 +361,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 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 @@ impl GspHal for Gh100 { 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); |
