diff --git a/drivers/gpu/nova-core/firmware/radix3.rs b/drivers/gpu/nova-core/firmware/radix3.rs index 225a3dd1b4a9..9051509cabaa 100644 --- a/drivers/gpu/nova-core/firmware/radix3.rs +++ b/drivers/gpu/nova-core/firmware/radix3.rs @@ -38,7 +38,7 @@ use crate::{ pub(crate) struct Radix3<'a> { /// The GSP firmware inside a [`VVec`], device-mapped via a SG table. #[pin] - fw: SGTable>>, + data: SGTable>>, /// Level 2 page table whose entries contain DMA addresses of firmware pages. #[pin] level2: SGTable>>, @@ -47,30 +47,30 @@ pub(crate) struct Radix3<'a> { level1: SGTable>>, /// Level 0 page table (single 4KB page) with one entry: DMA address of first level 1 page. level0: Coherent<'a, [u64]>, - /// Size in bytes of the firmware contained in [`Self::fw`]. + /// Size in bytes of the firmware contained in [`Self::data`]. size: usize, } impl<'a> Radix3<'a> { - /// Builds a radix3 page table over `fw_vvec`, mapped for `dev` to read. May sleep. + /// Builds a radix3 page table over `data`, mapped for `dev` to read. May sleep. pub(crate) fn new( dev: &'a device::Device, - fw_vvec: VVec, + data: VVec, ) -> impl PinInit + 'a { - let size = fw_vvec.len(); + let size = data.len(); pin_init::pin_init_scope(move || { Ok(try_pin_init!(Self { - fw <- SGTable::new(dev, fw_vvec, DataDirection::ToDevice, GFP_KERNEL), + data <- SGTable::new(dev, data, DataDirection::ToDevice, GFP_KERNEL), level2 <- { // Allocate the level 2 page table, map the firmware onto it, and map it into // the device address space. VVec::::with_capacity( - fw.iter().count() * core::mem::size_of::(), + data.iter().count() * core::mem::size_of::(), GFP_KERNEL, ) .map_err(|_| ENOMEM) - .and_then(|level2| map_into_lvl(&fw, level2)) + .and_then(|level2| map_into_lvl(&data, level2)) .map(|level2| SGTable::new(dev, level2, DataDirection::ToDevice, GFP_KERNEL))? }, level1 <- {