]> Gentwo Git Trees - linux/.git/commitdiff
gpu: nova-core: remove unnecessary need_riscv, bar parameters
authorJohn Hubbard <jhubbard@nvidia.com>
Sat, 25 Oct 2025 01:40:50 +0000 (18:40 -0700)
committerAlexandre Courbot <acourbot@nvidia.com>
Sat, 25 Oct 2025 04:12:05 +0000 (13:12 +0900)
The need_riscv parameter and its associated RISCV validation logic are
are actually unnecessary for correct operation. Remove it, along with
the now-unused bar parameter as well.

Signed-off-by: John Hubbard <jhubbard@nvidia.com>
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Message-ID: <20251025014050.585153-3-jhubbard@nvidia.com>

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

index 4c14ce1d19e9a05c41ddb6d81db34aa9202314ee..e4a4d454941c383d7aa1599380c67ed5615f7c3e 100644 (file)
@@ -362,26 +362,7 @@ pub(crate) struct Falcon<E: FalconEngine> {
 
 impl<E: FalconEngine + 'static> Falcon<E> {
     /// Create a new falcon instance.
-    ///
-    /// `need_riscv` is set to `true` if the caller expects the falcon to be a dual falcon/riscv
-    /// controller.
-    pub(crate) fn new(
-        dev: &device::Device,
-        chipset: Chipset,
-        bar: &Bar0,
-        need_riscv: bool,
-    ) -> Result<Self> {
-        if need_riscv {
-            let hwcfg2 = regs::NV_PFALCON_FALCON_HWCFG2::read(bar, &E::ID);
-            if !hwcfg2.riscv() {
-                dev_err!(
-                    dev,
-                    "riscv support requested on a controller that does not support it\n"
-                );
-                return Err(EINVAL);
-            }
-        }
-
+    pub(crate) fn new(dev: &device::Device, chipset: Chipset) -> Result<Self> {
         Ok(Self {
             hal: hal::falcon_hal(chipset)?,
             dev: dev.into(),
index af20e2daea24f6984a068802f0f4c86823f4ca05..9d182bffe8b45fd747839ef3aec8ee79d51bf5f8 100644 (file)
@@ -213,12 +213,10 @@ pub(crate) fn new<'a>(
             gsp_falcon: Falcon::new(
                 pdev.as_ref(),
                 spec.chipset,
-                bar,
-                spec.chipset > Chipset::GA100,
             )
             .inspect(|falcon| falcon.clear_swgen0_intr(bar))?,
 
-            sec2_falcon: Falcon::new(pdev.as_ref(), spec.chipset, bar, true)?,
+            sec2_falcon: Falcon::new(pdev.as_ref(), spec.chipset)?,
 
             gsp <- Gsp::new(),