mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 09:36:22 +02:00
gpu: nova-core: program_brom cannot fail
Change the signature of the program_brom HAL method to not return anything. None of the implementations can actually fail, so they always return Ok(()). Signed-off-by: Timur Tabi <ttabi@nvidia.com> Link: https://patch.msgid.link/20260205225922.2158430-1-ttabi@nvidia.com [acourbot: fix conflicts when applying.] Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
This commit is contained in:
parent
98e508e5b0
commit
f54b0c38bc
|
|
@ -488,7 +488,7 @@ pub(crate) fn pio_load<F: FalconFirmware<Target = E> + FalconPioLoadable>(
|
|||
}
|
||||
self.pio_wr_dmem_slice(bar, fw.dmem_load_params())?;
|
||||
|
||||
self.hal.program_brom(self, bar, &fw.brom_params())?;
|
||||
self.hal.program_brom(self, bar, &fw.brom_params());
|
||||
|
||||
bar.write(
|
||||
WithBase::of::<E>(),
|
||||
|
|
@ -647,7 +647,7 @@ fn dma_load<F: FalconFirmware<Target = E> + FalconDmaLoadable>(
|
|||
)?;
|
||||
self.dma_wr(bar, &dma_obj, FalconMem::Dmem, fw.dmem_load_params())?;
|
||||
|
||||
self.hal.program_brom(self, bar, &fw.brom_params())?;
|
||||
self.hal.program_brom(self, bar, &fw.brom_params());
|
||||
|
||||
// Set `BootVec` to start of non-secure code.
|
||||
bar.write(
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ fn signature_reg_fuse_version(
|
|||
) -> Result<u32>;
|
||||
|
||||
/// Program the boot ROM registers prior to starting a secure firmware.
|
||||
fn program_brom(&self, falcon: &Falcon<E>, bar: &Bar0, params: &FalconBromParams) -> Result;
|
||||
fn program_brom(&self, falcon: &Falcon<E>, bar: &Bar0, params: &FalconBromParams);
|
||||
|
||||
/// Check if the RISC-V core is active.
|
||||
/// Returns `true` if the RISC-V core is active, `false` otherwise.
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ fn signature_reg_fuse_version_ga102(
|
|||
Ok(u16::BITS - reg_fuse_version.leading_zeros())
|
||||
}
|
||||
|
||||
fn program_brom_ga102<E: FalconEngine>(bar: &Bar0, params: &FalconBromParams) -> Result {
|
||||
fn program_brom_ga102<E: FalconEngine>(bar: &Bar0, params: &FalconBromParams) {
|
||||
bar.write(
|
||||
WithBase::of::<E>().at(0),
|
||||
regs::NV_PFALCON2_FALCON_BROM_PARAADDR::zeroed().with_value(params.pkc_data_offset),
|
||||
|
|
@ -104,8 +104,6 @@ fn program_brom_ga102<E: FalconEngine>(bar: &Bar0, params: &FalconBromParams) ->
|
|||
WithBase::of::<E>(),
|
||||
regs::NV_PFALCON2_FALCON_MOD_SEL::zeroed().with_algo(FalconModSelAlgo::Rsa3k),
|
||||
);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub(super) struct Ga102<E: FalconEngine>(PhantomData<E>);
|
||||
|
|
@ -131,8 +129,8 @@ fn signature_reg_fuse_version(
|
|||
signature_reg_fuse_version_ga102(&falcon.dev, bar, engine_id_mask, ucode_id)
|
||||
}
|
||||
|
||||
fn program_brom(&self, _falcon: &Falcon<E>, bar: &Bar0, params: &FalconBromParams) -> Result {
|
||||
program_brom_ga102::<E>(bar, params)
|
||||
fn program_brom(&self, _falcon: &Falcon<E>, bar: &Bar0, params: &FalconBromParams) {
|
||||
program_brom_ga102::<E>(bar, params);
|
||||
}
|
||||
|
||||
fn is_riscv_active(&self, bar: &Bar0) -> bool {
|
||||
|
|
|
|||
|
|
@ -48,9 +48,7 @@ fn signature_reg_fuse_version(
|
|||
Ok(0)
|
||||
}
|
||||
|
||||
fn program_brom(&self, _falcon: &Falcon<E>, _bar: &Bar0, _params: &FalconBromParams) -> Result {
|
||||
Ok(())
|
||||
}
|
||||
fn program_brom(&self, _falcon: &Falcon<E>, _bar: &Bar0, _params: &FalconBromParams) {}
|
||||
|
||||
fn is_riscv_active(&self, bar: &Bar0) -> bool {
|
||||
bar.read(regs::NV_PRISCV_RISCV_CORE_SWITCH_RISCV_STATUS::of::<E>())
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user