mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 12:44:03 +02:00
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>
This commit is contained in:
parent
6e46097f4d
commit
528aef3a4b
|
|
@ -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> {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user