Skip to content

Commit f0fbbff

Browse files
committed
gpu: nova-core: require Send on FalconEngine and FalconHal
We want to store the GSP and SEC2 falcon instances inside the `Gpu` structure, but doing so require these types to implement `Send` for `pci::Driver` to remain implementable on `NovaCore`, which embeds `Gpu`. All implementors of `FalconEngine` and `FalconHal` satisfy the requirements of `Send`, and these traits also already required `Sync`, so this a minor tweak. Acked-by: Danilo Krummrich <dakr@kernel.org> Link: https://lore.kernel.org/r/20250913-nova_firmware-v6-1-9007079548b0@nvidia.com Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
1 parent 3760401 commit f0fbbff

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/gpu/nova-core/falcon.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ pub(crate) struct PFalcon2Base(());
286286
/// Each engine provides one base for `PFALCON` and `PFALCON2` registers. The `ID` constant is used
287287
/// to identify a given Falcon instance with register I/O methods.
288288
pub(crate) trait FalconEngine:
289-
Sync + RegisterBase<PFalconBase> + RegisterBase<PFalcon2Base> + Sized
289+
Send + Sync + RegisterBase<PFalconBase> + RegisterBase<PFalcon2Base> + Sized
290290
{
291291
/// Singleton of the engine, used to identify it with register I/O methods.
292292
const ID: Self;

drivers/gpu/nova-core/falcon/hal.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ mod ga102;
1313
/// Implements chipset-specific low-level operations. The trait is generic against [`FalconEngine`]
1414
/// so its `BASE` parameter can be used in order to avoid runtime bound checks when accessing
1515
/// registers.
16-
pub(crate) trait FalconHal<E: FalconEngine>: Sync {
16+
pub(crate) trait FalconHal<E: FalconEngine>: Send + Sync {
1717
/// Activates the Falcon core if the engine is a risvc/falcon dual engine.
1818
fn select_core(&self, _falcon: &Falcon<E>, _bar: &Bar0) -> Result {
1919
Ok(())

0 commit comments

Comments
 (0)