Lines Matching defs:sgt
181 /// - `sgt` is a valid pointer to a `struct sg_table` for the entire lifetime of the
183 /// - `sgt` is always DMA mapped.
185 sgt: NonNull<bindings::sg_table>,
199 /// - `sgt` must be a valid pointer to a `struct sg_table` for the entire lifetime of the
201 /// - The caller must guarantee that `sgt` remains DMA mapped for the entire lifetime of
204 sgt: NonNull<bindings::sg_table>,
211 // - `sgt` is a valid pointer to a `struct sg_table`.
213 bindings::dma_map_sgtable(dev.as_raw(), sgt.as_ptr(), dir.into(), 0)
216 // INVARIANT: By the safety requirements of this function it is guaranteed that `sgt` is
219 sgt,
232 // - `self.sgt.as_ptr()` is a valid pointer to a `struct sg_table` by the type invariants
237 bindings::dma_unmap_sgtable(self.dev.as_raw(), self.sgt.as_ptr(), self.dir.into(), 0)
273 let sgt = Opaque::zeroed();
275 // - `sgt.get()` is a valid pointer to uninitialized memory.
279 sgt.get(),
289 Ok(Self(sgt))
301 // SAFETY: `sgt` is a valid and initialized `struct sg_table`.
311 /// - The `struct sg_table` allocation (`sgt`).
322 sgt: RawSGTable,
367 sgt: unsafe { RawSGTable::new(&mut page_vec, size, max_segment, flags) }?,
370 let sgt = unsafe { &raw mut (*this.as_ptr()).sgt }.cast();
372 // SAFETY: `sgt` is guaranteed to be non-null.
373 let sgt = unsafe { NonNull::new_unchecked(sgt) };
377 // `sgt`.
378 // - `sgt` is never DMA unmapped manually.
379 Devres::new(dev, unsafe { DmaMappedSgt::new(sgt, dev, dir) })
422 /// let sgt = KBox::pin_init(SGTable::new(
450 // - `self.inner.sgt.as_raw()` is a valid pointer to a `struct sg_table` for the entire
453 unsafe { SGTable::from_raw(self.inner.sgt.as_raw()) }