| /linux/drivers/target/ |
| H A D | target_core_rd.c | 63 static u32 rd_release_sgl_table(struct rd_dev *rd_dev, struct rd_dev_sg_table *sg_table, in rd_release_sgl_table() argument 71 sg = sg_table[i].sg_table; in rd_release_sgl_table() 72 sg_per_table = sg_table[i].rd_sg_count; in rd_release_sgl_table() 84 kfree(sg_table); in rd_release_sgl_table() 112 static int rd_allocate_sgl_table(struct rd_dev *rd_dev, struct rd_dev_sg_table *sg_table, in rd_allocate_sgl_table() argument 141 sg_chain(sg_table[i - 1].sg_table, in rd_allocate_sgl_table() 145 sg_table[i].sg_table = sg; in rd_allocate_sgl_table() 146 sg_table[i].rd_sg_count = sg_per_table; in rd_allocate_sgl_table() 147 sg_table[i].page_start_offset = page_offset; in rd_allocate_sgl_table() 148 sg_table[i++].page_end_offset = (page_offset + sg_per_table) in rd_allocate_sgl_table() [all …]
|
| /linux/drivers/hwtracing/coresight/ |
| H A D | coresight-tmc-etr.c | 114 struct tmc_sg_table *sg_table; member 241 tmc_sg_get_data_page_offset(struct tmc_sg_table *sg_table, dma_addr_t addr) in tmc_sg_get_data_page_offset() argument 243 return tmc_pages_get_offset(&sg_table->data_pages, addr); in tmc_sg_get_data_page_offset() 246 static void tmc_free_table_pages(struct tmc_sg_table *sg_table) in tmc_free_table_pages() argument 248 if (sg_table->table_vaddr) in tmc_free_table_pages() 249 vunmap(sg_table->table_vaddr); in tmc_free_table_pages() 250 tmc_pages_free(&sg_table->table_pages, sg_table->dev, DMA_TO_DEVICE); in tmc_free_table_pages() 253 static void tmc_free_data_pages(struct tmc_sg_table *sg_table) in tmc_free_data_pages() argument 255 if (sg_table->data_vaddr) in tmc_free_data_pages() 256 vunmap(sg_table->data_vaddr); in tmc_free_data_pages() [all …]
|
| /linux/drivers/dma-buf/ |
| H A D | dma-buf.c | 58 struct sg_table *original; 59 struct sg_table wrapper; 853 static int dma_buf_wrap_sg_table(struct sg_table **sg_table) in dma_buf_wrap_sg_table() argument 856 struct sg_table *from = *sg_table; in dma_buf_wrap_sg_table() 887 *sg_table = &to->wrapper; in dma_buf_wrap_sg_table() 895 static void dma_buf_unwrap_sg_table(struct sg_table **sg_table) in dma_buf_unwrap_sg_table() argument 902 copy = container_of(*sg_table, typeof(*copy), wrapper); in dma_buf_unwrap_sg_table() 903 *sg_table = copy->original; in dma_buf_unwrap_sg_table() 1164 struct sg_table *dma_buf_map_attachment(struct dma_buf_attachment *attach, in dma_buf_map_attachment() 1167 struct sg_table *sg_table; in dma_buf_map_attachment() local [all …]
|
| /linux/include/linux/ |
| H A D | dma-buf.h | 171 struct sg_table * (*map_dma_buf)(struct dma_buf_attachment *, 182 struct sg_table *, 573 struct sg_table *dma_buf_map_attachment(struct dma_buf_attachment *, 575 void dma_buf_unmap_attachment(struct dma_buf_attachment *, struct sg_table *, 583 struct sg_table * 587 struct sg_table *sg_table,
|
| H A D | intel_th.h | 43 int (*alloc_window)(void *priv, struct sg_table **sgt, 45 void (*free_window)(void *priv, struct sg_table *sgt); 59 int (*ready)(void *priv, struct sg_table *sgt, size_t bytes); 65 void intel_th_msc_window_unlock(struct device *dev, struct sg_table *sgt);
|
| H A D | dma-mapping.h | 175 int dma_map_sgtable(struct device *dev, struct sg_table *sgt, 189 int dma_get_sgtable_attrs(struct device *dev, struct sg_table *sgt, 204 struct sg_table *dma_alloc_noncontiguous(struct device *dev, size_t size, 207 struct sg_table *sgt, enum dma_data_direction dir); 209 struct sg_table *sgt); 212 size_t size, struct sg_table *sgt); 244 static inline int dma_map_sgtable(struct device *dev, struct sg_table *sgt, in dma_map_sgtable() 282 struct sg_table *sgt, void *cpu_addr, dma_addr_t dma_addr, in dma_get_sgtable_attrs() 329 static inline struct sg_table *dma_alloc_noncontiguous(struct device *dev, in dma_alloc_noncontiguous() 336 struct sg_table *sgt, enum dma_data_direction dir) in dma_free_noncontiguous() [all …]
|
| /linux/drivers/spi/ |
| H A D | internals.h | 24 struct sg_table *sgt, void *buf, size_t len, 27 struct sg_table *sgt, enum dma_data_direction dir); 30 struct sg_table *sgt, void *buf, size_t len, in spi_map_buf() 37 struct device *dev, struct sg_table *sgt, in spi_unmap_buf()
|
| /linux/drivers/media/common/videobuf2/ |
| H A D | videobuf2-dma-contig.c | 34 struct sg_table *dma_sgt; 40 struct sg_table *sgt_base; 53 static unsigned long vb2_dc_get_contiguous_size(struct sg_table *sgt) in vb2_dc_get_contiguous_size() 126 struct sg_table *sgt = buf->dma_sgt; in vb2_dc_prepare() 146 struct sg_table *sgt = buf->dma_sgt; in vb2_dc_finish() 314 struct sg_table sgt; 324 struct sg_table *sgt; in vb2_dc_dmabuf_ops_attach() 360 struct sg_table *sgt; in vb2_dc_dmabuf_ops_detach() 382 static struct sg_table *vb2_dc_dmabuf_ops_map( in vb2_dc_dmabuf_ops_map() 386 struct sg_table *sgt; in vb2_dc_dmabuf_ops_map() [all …]
|
| H A D | videobuf2-vmalloc.c | 208 struct sg_table sgt; 218 struct sg_table *sgt; in vb2_vmalloc_dmabuf_ops_attach() 255 struct sg_table *sgt; in vb2_vmalloc_dmabuf_ops_detach() 270 static struct sg_table *vb2_vmalloc_dmabuf_ops_map( in vb2_vmalloc_dmabuf_ops_map() 274 struct sg_table *sgt; in vb2_vmalloc_dmabuf_ops_map() 299 struct sg_table *sgt, enum dma_data_direction dma_dir) in vb2_vmalloc_dmabuf_ops_unmap()
|
| /linux/include/drm/ |
| H A D | drm_gem_dma_helper.h | 24 struct sg_table *sgt; 40 struct sg_table *drm_gem_dma_get_sg_table(struct drm_gem_dma_object *dma_obj); 92 static inline struct sg_table *drm_gem_dma_object_get_sg_table(struct drm_gem_object *obj) in drm_gem_dma_object_get_sg_table() 153 struct sg_table *sgt); 228 struct sg_table *sgt);
|
| /linux/rust/kernel/ |
| H A D | scatterlist.rs | 17 //! `struct sg_table` types. 23 //! This type manages the allocation of the `struct sg_table`, the DMA mapping of the buffer, and 103 pub struct Borrowed(Opaque<bindings::sg_table>); 113 /// This struct is a wrapper around the kernel's `struct sg_table`. It manages a list of DMA-mapped 134 /// Creates a borrowed `&'a SGTable` from a raw `struct sg_table` pointer. 136 /// This allows safe access to an `sg_table` that is managed elsewhere (for example, in C code). 142 /// - the `struct sg_table` pointed to by `ptr` is valid for the entire lifetime of `'a`, 145 pub unsafe fn from_raw<'a>(ptr: *mut bindings::sg_table) -> &'a Self { in from_raw() 147 // to a `struct sg_table` for the duration of `'a`. in from_raw() 152 fn as_raw(&self) -> *mut bindings::sg_table { in as_raw() 151 as_raw(&self) -> *mut bindings::sg_table as_raw() argument 203 new( sgt: NonNull<bindings::sg_table>, dev: &Device<Bound>, dir: dma::DataDirection, ) -> Result<Self> new() argument 292 as_raw(&self) -> *mut bindings::sg_table as_raw() argument [all...] |
| /linux/drivers/gpu/drm/xen/ |
| H A D | xen_drm_front_gem.h | 18 struct sg_table; 26 struct sg_table *sgt); 28 struct sg_table *xen_drm_front_gem_get_sg_table(struct drm_gem_object *gem_obj);
|
| /linux/drivers/hwtracing/intel_th/ |
| H A D | msu-sink.c | 18 struct sg_table **sgts; 51 static int msu_sink_alloc_window(void *data, struct sg_table **sgt, size_t size) in msu_sink_alloc_window() 84 static void msu_sink_free_window(void *data, struct sg_table *sgt) in msu_sink_free_window() 99 static int msu_sink_ready(void *data, struct sg_table *sgt, size_t bytes) in msu_sink_ready()
|
| /linux/drivers/gpu/drm/i915/gt/ |
| H A D | intel_ggtt_fencing.h | 18 struct sg_table; 50 struct sg_table *pages); 52 struct sg_table *pages);
|
| /linux/drivers/gpu/drm/rockchip/ |
| H A D | rockchip_drm_gem.h | 25 struct sg_table *sgt; 29 struct sg_table *rockchip_gem_prime_get_sg_table(struct drm_gem_object *obj); 33 struct sg_table *sg);
|
| /linux/drivers/gpu/drm/omapdrm/ |
| H A D | omap_gem_dmabuf.c | 20 static struct sg_table *omap_gem_map_dma_buf( in omap_gem_map_dma_buf() 25 struct sg_table *sg; in omap_gem_map_dma_buf() 34 struct sg_table *sg, enum dma_data_direction dir) in omap_gem_unmap_dma_buf() 102 struct sg_table *sgt; in omap_gem_prime_import()
|
| H A D | omap_gem.h | 48 struct sg_table *sgt); 82 struct sg_table *omap_gem_get_sg(struct drm_gem_object *obj, 84 void omap_gem_put_sg(struct drm_gem_object *obj, struct sg_table *sgt);
|
| /linux/drivers/gpu/drm/exynos/ |
| H A D | exynos_drm_gem.h | 46 struct sg_table *sgt; 102 struct sg_table *exynos_drm_gem_prime_get_sg_table(struct drm_gem_object *obj); 106 struct sg_table *sgt);
|
| /linux/drivers/tee/ |
| H A D | tee_heap.c | 32 struct sg_table table; 36 struct sg_table table; 69 static int copy_sg_table(struct sg_table *dst, struct sg_table *src) in copy_sg_table() 122 static struct sg_table * 138 struct sg_table *table, in tee_heap_unmap_dma_buf() 398 struct sg_table *sgt, size_t size, in protmem_pool_op_static_alloc() 422 struct sg_table *sgt) in protmem_pool_op_static_free() 434 struct sg_table *sgt, size_t offs, in protmem_pool_op_static_update_shm()
|
| /linux/drivers/accel/ivpu/ |
| H A D | ivpu_gem_userptr.c | 22 static struct sg_table * 26 struct sg_table *sgt = attachment->dmabuf->priv; in ivpu_gem_userptr_dmabuf_map() 37 struct sg_table *sgt, in ivpu_gem_userptr_dmabuf_unmap() 45 struct sg_table *sgt = dma_buf->priv; in ivpu_gem_userptr_dmabuf_release() 70 struct sg_table *sgt; in ivpu_create_userptr_dmabuf()
|
| /linux/include/media/ |
| H A D | videobuf2-dma-sg.h | 18 static inline struct sg_table *vb2_dma_sg_plane_desc( in vb2_dma_sg_plane_desc() 21 return (struct sg_table *)vb2_plane_cookie(vb, plane_no); in vb2_dma_sg_plane_desc()
|
| /linux/drivers/gpu/drm/radeon/ |
| H A D | radeon_prime.h | 31 struct sg_table *radeon_gem_prime_get_sg_table(struct drm_gem_object *obj); 38 struct sg_table *sg);
|
| /linux/drivers/crypto/caam/ |
| H A D | caamalg_qi2.c | 374 struct dpaa2_sg_entry *sg_table; in aead_edesc_alloc() local 474 sg_table = &edesc->sgt[0]; in aead_edesc_alloc() 475 qm_sg_bytes = qm_sg_nents * sizeof(*sg_table); in aead_edesc_alloc() 487 u8 *iv = (u8 *)(sg_table + qm_sg_nents); in aead_edesc_alloc() 525 dma_to_qm_sg_one(sg_table, edesc->assoclen_dma, 4, 0); in aead_edesc_alloc() 528 dma_to_qm_sg_one(sg_table + qm_sg_index, iv_dma, ivsize, 0); in aead_edesc_alloc() 531 sg_to_qm_sg_last(req->src, src_len, sg_table + qm_sg_index, 0); in aead_edesc_alloc() 535 sg_to_qm_sg_last(req->dst, dst_len, sg_table + qm_sg_index, 0); in aead_edesc_alloc() 537 qm_sg_dma = dma_map_single(dev, sg_table, qm_sg_bytes, DMA_TO_DEVICE); in aead_edesc_alloc() 567 (1 + !!ivsize) * sizeof(*sg_table)); in aead_edesc_alloc() [all …]
|
| /linux/drivers/gpu/drm/renesas/rcar-du/ |
| H A D | rcar_du_kms.h | 21 struct sg_table; 42 struct sg_table *sgt);
|
| /linux/drivers/vfio/pci/pds/ |
| H A D | lm.h | 23 struct sg_table sg_table; /* SG table for backing pages */ member
|