Home
last modified time | relevance | path

Searched refs:attach (Results 1 – 25 of 477) sorted by relevance

12345678910>>...20

/Linux-v5.15/drivers/dma-buf/
Ddma-buf.c699 static struct sg_table * __map_dma_buf(struct dma_buf_attachment *attach, in __map_dma_buf() argument
704 sg_table = attach->dmabuf->ops->map_dma_buf(attach, direction); in __map_dma_buf()
739 struct dma_buf_attachment *attach; in dma_buf_dynamic_attach() local
748 attach = kzalloc(sizeof(*attach), GFP_KERNEL); in dma_buf_dynamic_attach()
749 if (!attach) in dma_buf_dynamic_attach()
752 attach->dev = dev; in dma_buf_dynamic_attach()
753 attach->dmabuf = dmabuf; in dma_buf_dynamic_attach()
755 attach->peer2peer = importer_ops->allow_peer2peer; in dma_buf_dynamic_attach()
756 attach->importer_ops = importer_ops; in dma_buf_dynamic_attach()
757 attach->importer_priv = importer_priv; in dma_buf_dynamic_attach()
[all …]
/Linux-v5.15/drivers/gpu/drm/amd/amdgpu/
Damdgpu_dma_buf.c54 struct dma_buf_attachment *attach) in amdgpu_dma_buf_attach() argument
61 if (pci_p2pdma_distance_many(adev->pdev, &attach->dev, 1, true) < 0) in amdgpu_dma_buf_attach()
62 attach->peer2peer = false; in amdgpu_dma_buf_attach()
64 if (attach->dev->driver == adev->dev->driver) in amdgpu_dma_buf_attach()
87 struct dma_buf_attachment *attach) in amdgpu_dma_buf_detach() argument
104 static int amdgpu_dma_buf_pin(struct dma_buf_attachment *attach) in amdgpu_dma_buf_pin() argument
106 struct drm_gem_object *obj = attach->dmabuf->priv; in amdgpu_dma_buf_pin()
132 static void amdgpu_dma_buf_unpin(struct dma_buf_attachment *attach) in amdgpu_dma_buf_unpin() argument
134 struct drm_gem_object *obj = attach->dmabuf->priv; in amdgpu_dma_buf_unpin()
153 static struct sg_table *amdgpu_dma_buf_map(struct dma_buf_attachment *attach, in amdgpu_dma_buf_map() argument
[all …]
/Linux-v5.15/drivers/media/common/videobuf2/
Dvideobuf2-vmalloc.c213 struct vb2_vmalloc_attachment *attach; in vb2_vmalloc_dmabuf_ops_attach() local
222 attach = kzalloc(sizeof(*attach), GFP_KERNEL); in vb2_vmalloc_dmabuf_ops_attach()
223 if (!attach) in vb2_vmalloc_dmabuf_ops_attach()
226 sgt = &attach->sgt; in vb2_vmalloc_dmabuf_ops_attach()
229 kfree(attach); in vb2_vmalloc_dmabuf_ops_attach()
237 kfree(attach); in vb2_vmalloc_dmabuf_ops_attach()
244 attach->dma_dir = DMA_NONE; in vb2_vmalloc_dmabuf_ops_attach()
245 dbuf_attach->priv = attach; in vb2_vmalloc_dmabuf_ops_attach()
252 struct vb2_vmalloc_attachment *attach = db_attach->priv; in vb2_vmalloc_dmabuf_ops_detach() local
255 if (!attach) in vb2_vmalloc_dmabuf_ops_detach()
[all …]
Dvideobuf2-dma-sg.c362 struct vb2_dma_sg_attachment *attach; in vb2_dma_sg_dmabuf_ops_attach() local
369 attach = kzalloc(sizeof(*attach), GFP_KERNEL); in vb2_dma_sg_dmabuf_ops_attach()
370 if (!attach) in vb2_dma_sg_dmabuf_ops_attach()
373 sgt = &attach->sgt; in vb2_dma_sg_dmabuf_ops_attach()
379 kfree(attach); in vb2_dma_sg_dmabuf_ops_attach()
391 attach->dma_dir = DMA_NONE; in vb2_dma_sg_dmabuf_ops_attach()
392 dbuf_attach->priv = attach; in vb2_dma_sg_dmabuf_ops_attach()
400 struct vb2_dma_sg_attachment *attach = db_attach->priv; in vb2_dma_sg_dmabuf_ops_detach() local
403 if (!attach) in vb2_dma_sg_dmabuf_ops_detach()
406 sgt = &attach->sgt; in vb2_dma_sg_dmabuf_ops_detach()
[all …]
Dvideobuf2-dma-contig.c222 struct vb2_dc_attachment *attach; in vb2_dc_dmabuf_ops_attach() local
229 attach = kzalloc(sizeof(*attach), GFP_KERNEL); in vb2_dc_dmabuf_ops_attach()
230 if (!attach) in vb2_dc_dmabuf_ops_attach()
233 sgt = &attach->sgt; in vb2_dc_dmabuf_ops_attach()
239 kfree(attach); in vb2_dc_dmabuf_ops_attach()
251 attach->dma_dir = DMA_NONE; in vb2_dc_dmabuf_ops_attach()
252 dbuf_attach->priv = attach; in vb2_dc_dmabuf_ops_attach()
260 struct vb2_dc_attachment *attach = db_attach->priv; in vb2_dc_dmabuf_ops_detach() local
263 if (!attach) in vb2_dc_dmabuf_ops_detach()
266 sgt = &attach->sgt; in vb2_dc_dmabuf_ops_detach()
[all …]
/Linux-v5.15/drivers/xen/
Dgntdev-dmabuf.c53 struct dma_buf_attachment *attach; member
226 struct dma_buf_attachment *attach) in dmabuf_exp_ops_attach() argument
236 attach->priv = gntdev_dmabuf_attach; in dmabuf_exp_ops_attach()
241 struct dma_buf_attachment *attach) in dmabuf_exp_ops_detach() argument
243 struct gntdev_dmabuf_attachment *gntdev_dmabuf_attach = attach->priv; in dmabuf_exp_ops_detach()
250 dma_unmap_sgtable(attach->dev, sgt, in dmabuf_exp_ops_detach()
258 attach->priv = NULL; in dmabuf_exp_ops_detach()
263 dmabuf_exp_ops_map_dma_buf(struct dma_buf_attachment *attach, in dmabuf_exp_ops_map_dma_buf() argument
266 struct gntdev_dmabuf_attachment *gntdev_dmabuf_attach = attach->priv; in dmabuf_exp_ops_map_dma_buf()
267 struct gntdev_dmabuf *gntdev_dmabuf = attach->dmabuf->priv; in dmabuf_exp_ops_map_dma_buf()
[all …]
/Linux-v5.15/include/linux/
Ddma-buf.h72 int (*attach)(struct dma_buf *, struct dma_buf_attachment *); member
109 int (*pin)(struct dma_buf_attachment *attach);
122 void (*unpin)(struct dma_buf_attachment *attach);
483 void (*move_notify)(struct dma_buf_attachment *attach);
590 dma_buf_attachment_is_dynamic(struct dma_buf_attachment *attach) in dma_buf_attachment_is_dynamic() argument
592 return !!attach->importer_ops; in dma_buf_attachment_is_dynamic()
602 struct dma_buf_attachment *attach);
603 int dma_buf_pin(struct dma_buf_attachment *attach);
604 void dma_buf_unpin(struct dma_buf_attachment *attach);
/Linux-v5.15/drivers/infiniband/core/
Dumem_dmabuf.c21 dma_resv_assert_held(umem_dmabuf->attach->dmabuf->resv); in ib_umem_dmabuf_map_pages()
26 sgt = dma_buf_map_attachment(umem_dmabuf->attach, DMA_BIDIRECTIONAL); in ib_umem_dmabuf_map_pages()
68 fence = dma_resv_excl_fence(umem_dmabuf->attach->dmabuf->resv); in ib_umem_dmabuf_map_pages()
78 dma_resv_assert_held(umem_dmabuf->attach->dmabuf->resv); in ib_umem_dmabuf_unmap_pages()
99 dma_buf_unmap_attachment(umem_dmabuf->attach, umem_dmabuf->sgt, in ib_umem_dmabuf_unmap_pages()
146 umem_dmabuf->attach = dma_buf_dynamic_attach( in ib_umem_dmabuf_get()
151 if (IS_ERR(umem_dmabuf->attach)) { in ib_umem_dmabuf_get()
152 ret = ERR_CAST(umem_dmabuf->attach); in ib_umem_dmabuf_get()
168 struct dma_buf *dmabuf = umem_dmabuf->attach->dmabuf; in ib_umem_dmabuf_release()
174 dma_buf_detach(dmabuf, umem_dmabuf->attach); in ib_umem_dmabuf_release()
/Linux-v5.15/drivers/gpu/drm/
Ddrm_prime.c575 struct dma_buf_attachment *attach) in drm_gem_map_attach() argument
593 struct dma_buf_attachment *attach) in drm_gem_map_detach() argument
613 struct sg_table *drm_gem_map_dma_buf(struct dma_buf_attachment *attach, in drm_gem_map_dma_buf() argument
616 struct drm_gem_object *obj = attach->dmabuf->priv; in drm_gem_map_dma_buf()
630 ret = dma_map_sgtable(attach->dev, sgt, dir, in drm_gem_map_dma_buf()
650 void drm_gem_unmap_dma_buf(struct dma_buf_attachment *attach, in drm_gem_unmap_dma_buf() argument
657 dma_unmap_sgtable(attach->dev, sgt, dir, DMA_ATTR_SKIP_CPU_SYNC); in drm_gem_unmap_dma_buf()
784 .attach = drm_gem_map_attach,
908 struct dma_buf_attachment *attach; in drm_gem_prime_import_dev() local
928 attach = dma_buf_attach(dma_buf, attach_dev); in drm_gem_prime_import_dev()
[all …]
Ddrm_gem_cma_helper.c439 struct dma_buf_attachment *attach, in drm_gem_cma_prime_import_sg_table() argument
445 if (drm_prime_get_contiguous_size(sgt) < attach->dmabuf->size) in drm_gem_cma_prime_import_sg_table()
449 cma_obj = __drm_gem_cma_create(dev, attach->dmabuf->size, true); in drm_gem_cma_prime_import_sg_table()
456 DRM_DEBUG_PRIME("dma_addr = %pad, size = %zu\n", &cma_obj->paddr, attach->dmabuf->size); in drm_gem_cma_prime_import_sg_table()
555 struct dma_buf_attachment *attach, in drm_gem_cma_prime_import_sg_table_vmap() argument
563 ret = dma_buf_vmap(attach->dmabuf, &map); in drm_gem_cma_prime_import_sg_table_vmap()
569 obj = drm_gem_cma_prime_import_sg_table(dev, attach, sgt); in drm_gem_cma_prime_import_sg_table_vmap()
571 dma_buf_vunmap(attach->dmabuf, &map); in drm_gem_cma_prime_import_sg_table_vmap()
/Linux-v5.15/drivers/gpu/drm/omapdrm/
Domap_gem_dmabuf.c129 struct dma_buf_attachment *attach; in omap_gem_prime_import() local
146 attach = dma_buf_attach(dma_buf, dev->dev); in omap_gem_prime_import()
147 if (IS_ERR(attach)) in omap_gem_prime_import()
148 return ERR_CAST(attach); in omap_gem_prime_import()
152 sgt = dma_buf_map_attachment(attach, DMA_TO_DEVICE); in omap_gem_prime_import()
164 obj->import_attach = attach; in omap_gem_prime_import()
169 dma_buf_unmap_attachment(attach, sgt, DMA_TO_DEVICE); in omap_gem_prime_import()
171 dma_buf_detach(dma_buf, attach); in omap_gem_prime_import()
/Linux-v5.15/drivers/gpu/drm/vmwgfx/
Dvmwgfx_prime.c43 struct dma_buf_attachment *attach) in vmw_prime_map_attach() argument
49 struct dma_buf_attachment *attach) in vmw_prime_map_detach() argument
53 static struct sg_table *vmw_prime_map_dma_buf(struct dma_buf_attachment *attach, in vmw_prime_map_dma_buf() argument
59 static void vmw_prime_unmap_dma_buf(struct dma_buf_attachment *attach, in vmw_prime_unmap_dma_buf() argument
66 .attach = vmw_prime_map_attach,
/Linux-v5.15/tools/bpf/bpftool/Documentation/
Dbpftool-cgroup.rst19 { **show** | **list** | **tree** | **attach** | **detach** | **help** }
26 | **bpftool** **cgroup attach** *CGROUP* *ATTACH_TYPE* *PROG* [*ATTACH_FLAGS*]
43 Output will start with program ID followed by attach type,
44 attach flags and program name.
57 program ID, attach type, attach flags and program name.
63 **bpftool cgroup attach** *CGROUP* *ATTACH_TYPE* *PROG* [*ATTACH_FLAGS*]
64 Attach program *PROG* to the cgroup *CGROUP* with attach type
74 no attach flags or the **override** flag. Attaching another
75 program will release old program and attach the new one.
114 Detach *PROG* from the cgroup *CGROUP* and attach type
[all …]
Dbpftool-net.rst18 { **show** | **list** | **attach** | **detach** | **help** }
24 | **bpftool** **net attach** *ATTACH_TYPE* *PROG* **dev** *NAME* [ **overwrite** ]
55 **bpftool** **net attach** *ATTACH_TYPE* *PROG* **dev** *NAME* [ **overwrite** ]
70 *ATTACH_TYPE* previously used for attach must be specified.
149 | **# bpftool net attach xdpdrv id 16 dev enp6s0np0**
158 | **# bpftool net attach xdpdrv id 16 dev enp6s0np0**
159 | **# bpftool net attach xdpdrv id 20 dev enp6s0np0 overwrite**
168 | **# bpftool net attach xdpdrv id 16 dev enp6s0np0**
/Linux-v5.15/drivers/virtio/
Dvirtio_dma_buf.c28 exp_info->ops->attach != &virtio_dma_buf_attach || in virtio_dma_buf_export()
41 struct dma_buf_attachment *attach) in virtio_dma_buf_attach() argument
49 ret = ops->device_attach(dma_buf, attach); in virtio_dma_buf_attach()
63 return dma_buf->ops->attach == &virtio_dma_buf_attach; in is_virtio_dma_buf()
/Linux-v5.15/drivers/nvdimm/
Dclaim.c44 bool __nd_attach_ndns(struct device *dev, struct nd_namespace_common *attach, in __nd_attach_ndns() argument
47 struct nvdimm_bus *nvdimm_bus = walk_to_nvdimm_bus(&attach->dev); in __nd_attach_ndns()
49 if (attach->claim) in __nd_attach_ndns()
53 attach->claim = dev; in __nd_attach_ndns()
54 *_ndns = attach; in __nd_attach_ndns()
55 get_device(&attach->dev); in __nd_attach_ndns()
59 bool nd_attach_ndns(struct device *dev, struct nd_namespace_common *attach, in nd_attach_ndns() argument
64 nvdimm_bus_lock(&attach->dev); in nd_attach_ndns()
65 claimed = __nd_attach_ndns(dev, attach, _ndns); in nd_attach_ndns()
66 nvdimm_bus_unlock(&attach->dev); in nd_attach_ndns()
/Linux-v5.15/drivers/gpu/drm/i915/gem/
Di915_gem_dmabuf.c164 struct dma_buf_attachment *attach) in i915_gem_dmabuf_attach() argument
193 struct dma_buf_attachment *attach) in i915_gem_dmabuf_detach() argument
201 .attach = i915_gem_dmabuf_attach,
269 struct dma_buf_attachment *attach; in i915_gem_prime_import() local
291 attach = dma_buf_attach(dma_buf, dev->dev); in i915_gem_prime_import()
292 if (IS_ERR(attach)) in i915_gem_prime_import()
293 return ERR_CAST(attach); in i915_gem_prime_import()
305 obj->base.import_attach = attach; in i915_gem_prime_import()
321 dma_buf_detach(dma_buf, attach); in i915_gem_prime_import()
/Linux-v5.15/drivers/gpu/drm/armada/
Darmada_gem.c385 armada_gem_prime_map_dma_buf(struct dma_buf_attachment *attach, in armada_gem_prime_map_dma_buf() argument
388 struct drm_gem_object *obj = attach->dmabuf->priv; in armada_gem_prime_map_dma_buf()
418 if (dma_map_sgtable(attach->dev, sgt, dir, 0)) in armada_gem_prime_map_dma_buf()
427 if (dma_map_sgtable(attach->dev, sgt, dir, 0)) in armada_gem_prime_map_dma_buf()
451 static void armada_gem_prime_unmap_dma_buf(struct dma_buf_attachment *attach, in armada_gem_prime_unmap_dma_buf() argument
454 struct drm_gem_object *obj = attach->dmabuf->priv; in armada_gem_prime_unmap_dma_buf()
459 dma_unmap_sgtable(attach->dev, sgt, dir, 0); in armada_gem_prime_unmap_dma_buf()
501 struct dma_buf_attachment *attach; in armada_gem_prime_import() local
516 attach = dma_buf_attach(buf, dev->dev); in armada_gem_prime_import()
517 if (IS_ERR(attach)) in armada_gem_prime_import()
[all …]
/Linux-v5.15/Documentation/bpf/
Dmap_cgroup_storage.rst10 attach to cgroups; the programs are made available by the same Kconfig. The
34 ``attach_type`` is the the program's attach type.
37 When this key type is used, then all attach types of the particular cgroup and
39 ``struct bpf_cgroup_storage_key``, then programs of different attach types
133 multiple attach types, and each attach creates a fresh zeroed storage. The
145 does not already contain an entry for the cgroup and attach type pair, or else
146 the old storage is reused for the new attachment. If the map is attach type
147 shared, then attach type is simply ignored during comparison. Storage is freed
158 In all versions, userspace may use the the attach parameters of cgroup and
159 attach type pair in ``struct bpf_cgroup_storage_key`` as the key to the BPF map
[all …]
/Linux-v5.15/include/drm/
Ddrm_prime.h78 struct dma_buf_attachment *attach);
80 struct dma_buf_attachment *attach);
81 struct sg_table *drm_gem_map_dma_buf(struct dma_buf_attachment *attach,
83 void drm_gem_unmap_dma_buf(struct dma_buf_attachment *attach,
/Linux-v5.15/drivers/gpu/drm/tegra/
Dgem.c405 struct dma_buf_attachment *attach; in tegra_bo_import() local
413 attach = dma_buf_attach(buf, drm->dev); in tegra_bo_import()
414 if (IS_ERR(attach)) { in tegra_bo_import()
415 err = PTR_ERR(attach); in tegra_bo_import()
421 bo->sgt = dma_buf_map_attachment(attach, DMA_TO_DEVICE); in tegra_bo_import()
433 bo->gem.import_attach = attach; in tegra_bo_import()
439 dma_buf_unmap_attachment(attach, bo->sgt, DMA_TO_DEVICE); in tegra_bo_import()
441 dma_buf_detach(buf, attach); in tegra_bo_import()
561 tegra_gem_prime_map_dma_buf(struct dma_buf_attachment *attach, in tegra_gem_prime_map_dma_buf() argument
564 struct drm_gem_object *gem = attach->dmabuf->priv; in tegra_gem_prime_map_dma_buf()
[all …]
/Linux-v5.15/samples/bpf/
Dxdp_fwd_user.c87 int attach = 1; in main() local
93 attach = 0; in main()
118 if (attach) { in main()
160 if (!attach) { in main()
Dtcp_bpf.readme2 programs. These programs attach to a cgroupv2. The following commands create
3 a cgroupv2 and attach a bash shell to the group.
12 (attach) one of the tcp_*_kern.o programs:
15 bpftool cgroup attach /tmp/cgroupv2/foo sock_ops pinned /sys/fs/bpf/tcp_prog
/Linux-v5.15/tools/testing/selftests/bpf/
Dflow_dissector_load.c60 bool attach = false; in parse_opts() local
69 attach = true; in parse_opts()
72 if (attach) in parse_opts()
/Linux-v5.15/tools/testing/selftests/drivers/usb/usbip/
Dusbip_test.sh125 src/usbip attach -r localhost -b $busid;
141 src/usbip attach -r localhost -b $busid;
153 src/usbip attach -r localhost -b $busid;

12345678910>>...20