Home
last modified time | relevance | path

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

12345678910>>...23

/linux/drivers/dma-buf/
H A Ddma-buf.c806 attach->dmabuf->ops->unmap_dma_buf(attach, sg_table, in __map_dma_buf()
916 attach = kzalloc(sizeof(*attach), GFP_KERNEL); in dma_buf_dynamic_attach()
928 ret = dmabuf->ops->attach(dmabuf, attach); in dma_buf_dynamic_attach()
1024 __unmap_dma_buf(attach, attach->sgt, attach->dir); in dma_buf_detach()
1120 if (WARN_ON(!attach || !attach->dmabuf)) in dma_buf_map_attachment()
1139 r = attach->dmabuf->ops->pin(attach); in dma_buf_map_attachment()
1151 attach->dmabuf->ops->unpin(attach); in dma_buf_map_attachment()
1196 if (WARN_ON(!attach || !attach->dmabuf)) in dma_buf_map_attachment_unlocked()
1223 if (WARN_ON(!attach || !attach->dmabuf || !sg_table)) in dma_buf_unmap_attachment()
1255 if (WARN_ON(!attach || !attach->dmabuf || !sg_table)) in dma_buf_unmap_attachment_unlocked()
[all …]
/linux/drivers/gpu/drm/xe/
H A Dxe_dma_buf.c26 struct dma_buf_attachment *attach) in xe_dma_buf_attach() argument
30 if (attach->peer2peer && in xe_dma_buf_attach()
32 attach->peer2peer = false; in xe_dma_buf_attach()
42 struct dma_buf_attachment *attach) in xe_dma_buf_detach() argument
92 struct dma_buf *dma_buf = attach->dmabuf; in xe_dma_buf_map()
102 if (!attach->peer2peer) in xe_dma_buf_map()
180 .attach = xe_dma_buf_attach,
267 struct dma_buf_attachment *attach; in xe_gem_prime_import() local
300 if (IS_ERR(attach)) { in xe_gem_prime_import()
301 obj = ERR_CAST(attach); in xe_gem_prime_import()
[all …]
/linux/drivers/infiniband/core/
H A Dumem_dmabuf.c24 dma_resv_assert_held(umem_dmabuf->attach->dmabuf->resv); in ib_umem_dmabuf_map_pages()
29 sgt = dma_buf_map_attachment(umem_dmabuf->attach, in ib_umem_dmabuf_map_pages()
153 umem_dmabuf->attach = dma_buf_dynamic_attach( in ib_umem_dmabuf_get()
158 if (IS_ERR(umem_dmabuf->attach)) { in ib_umem_dmabuf_get()
159 ret = ERR_CAST(umem_dmabuf->attach); in ib_umem_dmabuf_get()
201 err = dma_buf_pin(umem_dmabuf->attach); in ib_umem_dmabuf_get_pinned()
209 dma_resv_unlock(umem_dmabuf->attach->dmabuf->resv); in ib_umem_dmabuf_get_pinned()
214 dma_buf_unpin(umem_dmabuf->attach); in ib_umem_dmabuf_get_pinned()
216 dma_resv_unlock(umem_dmabuf->attach->dmabuf->resv); in ib_umem_dmabuf_get_pinned()
229 dma_buf_unpin(umem_dmabuf->attach); in ib_umem_dmabuf_release()
[all …]
/linux/drivers/gpu/drm/amd/amdgpu/
H A Damdgpu_dma_buf.c56 struct dma_buf_attachment *attach) in amdgpu_dma_buf_attach() argument
64 attach->peer2peer = false; in amdgpu_dma_buf_attach()
88 struct dma_buf_attachment *attach) in amdgpu_dma_buf_detach() argument
146 struct dma_buf *dma_buf = attach->dmabuf; in amdgpu_dma_buf_map()
159 attach->peer2peer) { in amdgpu_dma_buf_map()
188 bo->tbo.base.size, attach->dev, in amdgpu_dma_buf_map()
269 .attach = amdgpu_dma_buf_attach,
448 struct dma_buf_attachment *attach; in amdgpu_gem_prime_import() local
469 if (IS_ERR(attach)) { in amdgpu_gem_prime_import()
471 return ERR_CAST(attach); in amdgpu_gem_prime_import()
[all …]
/linux/drivers/media/common/videobuf2/
H A Dvideobuf2-vmalloc.c224 attach = kzalloc(sizeof(*attach), GFP_KERNEL); in vb2_vmalloc_dmabuf_ops_attach()
225 if (!attach) in vb2_vmalloc_dmabuf_ops_attach()
228 sgt = &attach->sgt; in vb2_vmalloc_dmabuf_ops_attach()
231 kfree(attach); in vb2_vmalloc_dmabuf_ops_attach()
239 kfree(attach); in vb2_vmalloc_dmabuf_ops_attach()
246 attach->dma_dir = DMA_NONE; in vb2_vmalloc_dmabuf_ops_attach()
257 if (!attach) in vb2_vmalloc_dmabuf_ops_detach()
260 sgt = &attach->sgt; in vb2_vmalloc_dmabuf_ops_detach()
266 kfree(attach); in vb2_vmalloc_dmabuf_ops_detach()
276 sgt = &attach->sgt; in vb2_vmalloc_dmabuf_ops_map()
[all …]
H A Dvideobuf2-dma-sg.c378 attach = kzalloc(sizeof(*attach), GFP_KERNEL); in vb2_dma_sg_dmabuf_ops_attach()
379 if (!attach) in vb2_dma_sg_dmabuf_ops_attach()
382 sgt = &attach->sgt; in vb2_dma_sg_dmabuf_ops_attach()
388 kfree(attach); in vb2_dma_sg_dmabuf_ops_attach()
400 attach->dma_dir = DMA_NONE; in vb2_dma_sg_dmabuf_ops_attach()
401 dbuf_attach->priv = attach; in vb2_dma_sg_dmabuf_ops_attach()
412 if (!attach) in vb2_dma_sg_dmabuf_ops_detach()
415 sgt = &attach->sgt; in vb2_dma_sg_dmabuf_ops_detach()
421 kfree(attach); in vb2_dma_sg_dmabuf_ops_detach()
431 sgt = &attach->sgt; in vb2_dma_sg_dmabuf_ops_map()
[all …]
H A Dvideobuf2-dma-contig.c327 attach = kzalloc(sizeof(*attach), GFP_KERNEL); in vb2_dc_dmabuf_ops_attach()
328 if (!attach) in vb2_dc_dmabuf_ops_attach()
331 sgt = &attach->sgt; in vb2_dc_dmabuf_ops_attach()
337 kfree(attach); in vb2_dc_dmabuf_ops_attach()
349 attach->dma_dir = DMA_NONE; in vb2_dc_dmabuf_ops_attach()
350 dbuf_attach->priv = attach; in vb2_dc_dmabuf_ops_attach()
361 if (!attach) in vb2_dc_dmabuf_ops_detach()
364 sgt = &attach->sgt; in vb2_dc_dmabuf_ops_detach()
377 kfree(attach); in vb2_dc_dmabuf_ops_detach()
387 sgt = &attach->sgt; in vb2_dc_dmabuf_ops_map()
[all …]
/linux/include/linux/
H A 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);
488 void (*move_notify)(struct dma_buf_attachment *attach);
595 dma_buf_attachment_is_dynamic(struct dma_buf_attachment *attach) in dma_buf_attachment_is_dynamic() argument
597 return !!attach->importer_ops; in dma_buf_attachment_is_dynamic()
607 struct dma_buf_attachment *attach);
608 int dma_buf_pin(struct dma_buf_attachment *attach);
609 void dma_buf_unpin(struct dma_buf_attachment *attach);
627 dma_buf_map_attachment_unlocked(struct dma_buf_attachment *attach,
[all …]
/linux/drivers/gpu/drm/virtio/
H A Dvirtgpu_prime.c47 virtgpu_gem_map_dma_buf(struct dma_buf_attachment *attach, in virtgpu_gem_map_dma_buf() argument
50 struct drm_gem_object *obj = attach->dmabuf->priv; in virtgpu_gem_map_dma_buf()
54 return virtio_gpu_vram_map_dma_buf(bo, attach->dev, dir); in virtgpu_gem_map_dma_buf()
56 return drm_gem_map_dma_buf(attach, dir); in virtgpu_gem_map_dma_buf()
59 static void virtgpu_gem_unmap_dma_buf(struct dma_buf_attachment *attach, in virtgpu_gem_unmap_dma_buf() argument
63 struct drm_gem_object *obj = attach->dmabuf->priv; in virtgpu_gem_unmap_dma_buf()
67 virtio_gpu_vram_unmap_dma_buf(attach->dev, sgt, dir); in virtgpu_gem_unmap_dma_buf()
71 drm_gem_unmap_dma_buf(attach, sgt, dir); in virtgpu_gem_unmap_dma_buf()
77 .attach = virtio_dma_buf_attach,
166 struct drm_device *dev, struct dma_buf_attachment *attach, in virtgpu_gem_prime_import_sg_table() argument
/linux/drivers/xen/
H A Dgntdev-dmabuf.c48 struct dma_buf_attachment *attach; member
253 attach->priv = NULL; in dmabuf_exp_ops_detach()
266 attach->dev); in dmabuf_exp_ops_map_dma_buf()
340 .attach = dmabuf_exp_ops_attach,
591 if (IS_ERR(attach)) { in dmabuf_imp_to_refs()
592 ret = ERR_CAST(attach); in dmabuf_imp_to_refs()
596 gntdev_dmabuf->u.imp.attach = attach; in dmabuf_imp_to_refs()
663 dma_buf_detach(dma_buf, attach); in dmabuf_imp_to_refs()
708 attach = gntdev_dmabuf->u.imp.attach; in dmabuf_imp_release()
713 dma_buf = attach->dmabuf; in dmabuf_imp_release()
[all …]
/linux/drivers/gpu/drm/omapdrm/
H A Domap_gem_dmabuf.c100 struct dma_buf_attachment *attach; in omap_gem_prime_import() local
117 attach = dma_buf_attach(dma_buf, dev->dev); in omap_gem_prime_import()
118 if (IS_ERR(attach)) in omap_gem_prime_import()
119 return ERR_CAST(attach); in omap_gem_prime_import()
123 sgt = dma_buf_map_attachment_unlocked(attach, DMA_TO_DEVICE); in omap_gem_prime_import()
135 obj->import_attach = attach; in omap_gem_prime_import()
140 dma_buf_unmap_attachment_unlocked(attach, sgt, DMA_TO_DEVICE); in omap_gem_prime_import()
142 dma_buf_detach(dma_buf, attach); in omap_gem_prime_import()
/linux/drivers/gpu/drm/
H A Ddrm_prime.c607 struct dma_buf_attachment *attach) in drm_gem_map_detach() argument
790 .attach = drm_gem_map_attach,
914 struct dma_buf_attachment *attach; in drm_gem_prime_import_dev() local
935 if (IS_ERR(attach)) in drm_gem_prime_import_dev()
936 return ERR_CAST(attach); in drm_gem_prime_import_dev()
952 obj->import_attach = attach; in drm_gem_prime_import_dev()
960 dma_buf_detach(dma_buf, attach); in drm_gem_prime_import_dev()
1051 struct dma_buf_attachment *attach; in drm_prime_gem_destroy() local
1054 attach = obj->import_attach; in drm_prime_gem_destroy()
1057 dma_buf = attach->dmabuf; in drm_prime_gem_destroy()
[all …]
/linux/drivers/gpu/drm/i915/gem/
H A Di915_gem_dmabuf.c31 struct drm_i915_gem_object *obj = dma_buf_to_obj(attach->dmabuf); in i915_gem_map_dma_buf()
56 ret = dma_map_sgtable(attach->dev, sgt, dir, DMA_ATTR_SKIP_CPU_SYNC); in i915_gem_map_dma_buf()
168 struct dma_buf_attachment *attach) in i915_gem_dmabuf_attach() argument
197 struct dma_buf_attachment *attach) in i915_gem_dmabuf_detach() argument
205 .attach = i915_gem_dmabuf_attach,
286 struct dma_buf_attachment *attach; in i915_gem_prime_import() local
308 attach = dma_buf_attach(dma_buf, dev->dev); in i915_gem_prime_import()
309 if (IS_ERR(attach)) in i915_gem_prime_import()
310 return ERR_CAST(attach); in i915_gem_prime_import()
323 obj->base.import_attach = attach; in i915_gem_prime_import()
[all …]
/linux/drivers/gpu/drm/tegra/
H A Dgem.c82 map->attach = dma_buf_attach(buf, dev); in tegra_bo_pin()
83 if (IS_ERR(map->attach)) { in tegra_bo_pin()
84 err = PTR_ERR(map->attach); in tegra_bo_pin()
90 dma_buf_detach(buf, map->attach); in tegra_bo_pin()
163 if (map->attach) { in tegra_bo_unpin()
166 dma_buf_detach(map->attach->dmabuf, map->attach); in tegra_bo_unpin()
460 struct dma_buf_attachment *attach; in tegra_bo_import() local
469 if (IS_ERR(attach)) { in tegra_bo_import()
470 err = PTR_ERR(attach); in tegra_bo_import()
488 bo->gem.import_attach = attach; in tegra_bo_import()
[all …]
/linux/drivers/gpu/drm/vmwgfx/
H A 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/Documentation/bpf/libbpf/
H A Dprogram_types.rst8 The table below lists the program types, their attach types where relevant and the ELF section
15 When ``extras`` are specified, they provide details of how to auto-attach the BPF program. The
200 .. [#fentry] The ``fentry`` attach format is ``fentry[.s]/<function>``.
201 .. [#kprobe] The ``kprobe`` attach format is ``kprobe/<function>[+<offset>]``. Valid
204 .. [#ksyscall] The ``ksyscall`` attach format is ``ksyscall/<syscall>``.
205 .. [#uprobe] The ``uprobe`` attach format is ``uprobe[.s]/<path>:<function>[+<offset>]``.
206 .. [#usdt] The ``usdt`` attach format is ``usdt/<path>:<provider>:<name>``.
207 .. [#kpmulti] The ``kprobe.multi`` attach format is ``kprobe.multi/<pattern>`` where ``pattern``
211 .. [#rawtp] The ``raw_tp`` attach format is ``raw_tracepoint[.w]/<tracepoint>``.
212 .. [#tp] The ``tracepoint`` attach format is ``tracepoint/<category>/<name>``.
[all …]
/linux/tools/bpf/bpftool/Documentation/
H A Dbpftool-cgroup.rst22 { **show** | **list** | **tree** | **attach** | **detach** | **help** }
29 | **bpftool** **cgroup attach** *CGROUP* *ATTACH_TYPE* *PROG* [*ATTACH_FLAGS*]
55 Output will start with program ID followed by attach type, attach flags and
67 with absolute cgroup path, followed by program ID, attach type, attach
74 bpftool cgroup attach *CGROUP* *ATTACH_TYPE* *PROG* [*ATTACH_FLAGS*]
75 Attach program *PROG* to the cgroup *CGROUP* with attach type *ATTACH_TYPE*
83 Only one program is allowed to be attached to a cgroup with no attach flags
85 program and attach the new one.
125 Detach *PROG* from the cgroup *CGROUP* and attach type *ATTACH_TYPE*.
143 | **# bpftool cgroup attach /sys/fs/cgroup/test.slice/ device id 1 allow_multi**
H A Dbpftool-net.rst21 *COMMANDS* := { **show** | **list** | **attach** | **detach** | **help** }
27 | **bpftool** **net attach** *ATTACH_TYPE* *PROG* **dev** *NAME* [ **overwrite** ]
61 bpftool net attach *ATTACH_TYPE* *PROG* dev *NAME* [ overwrite ]
76 for attach must be specified. Currently, only XDP-related modes are
155 | **# bpftool net attach xdpdrv id 16 dev enp6s0np0**
164 | **# bpftool net attach xdpdrv id 16 dev enp6s0np0**
165 | **# bpftool net attach xdpdrv id 20 dev enp6s0np0 overwrite**
174 | **# bpftool net attach xdpdrv id 16 dev enp6s0np0**
/linux/drivers/nvdimm/
H A 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/drivers/virtio/
H A 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/drivers/vfio/
H A Ddevice_cdev.c159 struct vfio_device_attach_iommufd_pt attach; in vfio_df_ioctl_attach_pt() local
165 if (copy_from_user(&attach, arg, minsz)) in vfio_df_ioctl_attach_pt()
168 if (attach.argsz < minsz || attach.flags) in vfio_df_ioctl_attach_pt()
172 ret = device->ops->attach_ioas(device, &attach.pt_id); in vfio_df_ioctl_attach_pt()
176 if (copy_to_user(&arg->pt_id, &attach.pt_id, sizeof(attach.pt_id))) { in vfio_df_ioctl_attach_pt()
/linux/Documentation/bpf/
H A Dmap_cgroup_storage.rst10 attach to cgroups; the programs are made available by the same Kconfig. The
34 ``attach_type`` is 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 attach parameters of cgroup and
161 attach type shared storages, only the first value in the struct, cgroup inode
[all …]
/linux/drivers/gpu/drm/armada/
H A Darmada_gem.c389 struct drm_gem_object *obj = attach->dmabuf->priv; in armada_gem_prime_map_dma_buf()
419 if (dma_map_sgtable(attach->dev, sgt, dir, 0)) in armada_gem_prime_map_dma_buf()
428 if (dma_map_sgtable(attach->dev, sgt, dir, 0)) in armada_gem_prime_map_dma_buf()
455 struct drm_gem_object *obj = attach->dmabuf->priv; in armada_gem_prime_unmap_dma_buf()
460 dma_unmap_sgtable(attach->dev, sgt, dir, 0); in armada_gem_prime_unmap_dma_buf()
502 struct dma_buf_attachment *attach; in armada_gem_prime_import() local
517 attach = dma_buf_attach(buf, dev->dev); in armada_gem_prime_import()
518 if (IS_ERR(attach)) in armada_gem_prime_import()
519 return ERR_CAST(attach); in armada_gem_prime_import()
523 dma_buf_detach(buf, attach); in armada_gem_prime_import()
[all …]
/linux/include/drm/
H A 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/samples/bpf/
H A 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

12345678910>>...23