Home
last modified time | relevance | path

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

12345678910>>...22

/Linux-v6.6/drivers/dma-buf/
Ddma-buf.c777 static struct sg_table * __map_dma_buf(struct dma_buf_attachment *attach, in __map_dma_buf() argument
783 sg_table = attach->dmabuf->ops->map_dma_buf(attach, direction); in __map_dma_buf()
787 if (!dma_buf_attachment_is_dynamic(attach)) { in __map_dma_buf()
788 ret = dma_resv_wait_timeout(attach->dmabuf->resv, in __map_dma_buf()
792 attach->dmabuf->ops->unmap_dma_buf(attach, sg_table, in __map_dma_buf()
893 struct dma_buf_attachment *attach; in dma_buf_dynamic_attach() local
902 attach = kzalloc(sizeof(*attach), GFP_KERNEL); in dma_buf_dynamic_attach()
903 if (!attach) in dma_buf_dynamic_attach()
906 attach->dev = dev; in dma_buf_dynamic_attach()
907 attach->dmabuf = dmabuf; in dma_buf_dynamic_attach()
[all …]
/Linux-v6.6/drivers/infiniband/core/
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()
72 ret = dma_resv_wait_timeout(umem_dmabuf->attach->dmabuf->resv, in ib_umem_dmabuf_map_pages()
85 dma_resv_assert_held(umem_dmabuf->attach->dmabuf->resv); in ib_umem_dmabuf_unmap_pages()
106 dma_buf_unmap_attachment(umem_dmabuf->attach, umem_dmabuf->sgt, in ib_umem_dmabuf_unmap_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()
174 ib_umem_dmabuf_unsupported_move_notify(struct dma_buf_attachment *attach) in ib_umem_dmabuf_unsupported_move_notify() argument
176 struct ib_umem_dmabuf *umem_dmabuf = attach->importer_priv; in ib_umem_dmabuf_unsupported_move_notify()
[all …]
/Linux-v6.6/drivers/gpu/drm/amd/amdgpu/
Damdgpu_dma_buf.c55 struct dma_buf_attachment *attach) in amdgpu_dma_buf_attach() argument
62 if (pci_p2pdma_distance(adev->pdev, attach->dev, false) < 0) in amdgpu_dma_buf_attach()
63 attach->peer2peer = false; in amdgpu_dma_buf_attach()
85 struct dma_buf_attachment *attach) in amdgpu_dma_buf_detach() argument
102 static int amdgpu_dma_buf_pin(struct dma_buf_attachment *attach) in amdgpu_dma_buf_pin() argument
104 struct drm_gem_object *obj = attach->dmabuf->priv; in amdgpu_dma_buf_pin()
118 static void amdgpu_dma_buf_unpin(struct dma_buf_attachment *attach) in amdgpu_dma_buf_unpin() argument
120 struct drm_gem_object *obj = attach->dmabuf->priv; in amdgpu_dma_buf_unpin()
139 static struct sg_table *amdgpu_dma_buf_map(struct dma_buf_attachment *attach, in amdgpu_dma_buf_map() argument
142 struct dma_buf *dma_buf = attach->dmabuf; in amdgpu_dma_buf_map()
[all …]
/Linux-v6.6/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.c371 struct vb2_dma_sg_attachment *attach; in vb2_dma_sg_dmabuf_ops_attach() local
378 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()
409 struct vb2_dma_sg_attachment *attach = db_attach->priv; in vb2_dma_sg_dmabuf_ops_detach() local
412 if (!attach) in vb2_dma_sg_dmabuf_ops_detach()
415 sgt = &attach->sgt; in vb2_dma_sg_dmabuf_ops_detach()
[all …]
Dvideobuf2-dma-contig.c320 struct vb2_dc_attachment *attach; in vb2_dc_dmabuf_ops_attach() local
327 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()
358 struct vb2_dc_attachment *attach = db_attach->priv; in vb2_dc_dmabuf_ops_detach() local
361 if (!attach) in vb2_dc_dmabuf_ops_detach()
364 sgt = &attach->sgt; in vb2_dc_dmabuf_ops_detach()
[all …]
/Linux-v6.6/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);
622 dma_buf_map_attachment_unlocked(struct dma_buf_attachment *attach,
[all …]
/Linux-v6.6/drivers/gpu/drm/virtio/
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-v6.6/drivers/xen/
Dgntdev-dmabuf.c47 struct dma_buf_attachment *attach; member
220 struct dma_buf_attachment *attach) in dmabuf_exp_ops_attach() argument
230 attach->priv = gntdev_dmabuf_attach; in dmabuf_exp_ops_attach()
235 struct dma_buf_attachment *attach) in dmabuf_exp_ops_detach() argument
237 struct gntdev_dmabuf_attachment *gntdev_dmabuf_attach = attach->priv; in dmabuf_exp_ops_detach()
244 dma_unmap_sgtable(attach->dev, sgt, in dmabuf_exp_ops_detach()
252 attach->priv = NULL; in dmabuf_exp_ops_detach()
257 dmabuf_exp_ops_map_dma_buf(struct dma_buf_attachment *attach, in dmabuf_exp_ops_map_dma_buf() argument
260 struct gntdev_dmabuf_attachment *gntdev_dmabuf_attach = attach->priv; in dmabuf_exp_ops_map_dma_buf()
261 struct gntdev_dmabuf *gntdev_dmabuf = attach->dmabuf->priv; in dmabuf_exp_ops_map_dma_buf()
[all …]
/Linux-v6.6/drivers/gpu/drm/omapdrm/
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-v6.6/drivers/gpu/drm/
Ddrm_prime.c579 struct dma_buf_attachment *attach) in drm_gem_map_attach() argument
600 struct dma_buf_attachment *attach) in drm_gem_map_detach() argument
620 struct sg_table *drm_gem_map_dma_buf(struct dma_buf_attachment *attach, in drm_gem_map_dma_buf() argument
623 struct drm_gem_object *obj = attach->dmabuf->priv; in drm_gem_map_dma_buf()
637 ret = dma_map_sgtable(attach->dev, sgt, dir, in drm_gem_map_dma_buf()
657 void drm_gem_unmap_dma_buf(struct dma_buf_attachment *attach, in drm_gem_unmap_dma_buf() argument
664 dma_unmap_sgtable(attach->dev, sgt, dir, DMA_ATTR_SKIP_CPU_SYNC); in drm_gem_unmap_dma_buf()
783 .attach = drm_gem_map_attach,
907 struct dma_buf_attachment *attach; in drm_gem_prime_import_dev() local
927 attach = dma_buf_attach(dma_buf, attach_dev); in drm_gem_prime_import_dev()
[all …]
/Linux-v6.6/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-v6.6/drivers/gpu/drm/i915/gem/
Di915_gem_dmabuf.c28 static struct sg_table *i915_gem_map_dma_buf(struct dma_buf_attachment *attach, in i915_gem_map_dma_buf() argument
31 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()
[all …]
/Linux-v6.6/drivers/gpu/drm/tegra/
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()
88 map->sgt = dma_buf_map_attachment_unlocked(map->attach, direction); in tegra_bo_pin()
90 dma_buf_detach(buf, map->attach); in tegra_bo_pin()
163 if (map->attach) { in tegra_bo_unpin()
164 dma_buf_unmap_attachment_unlocked(map->attach, map->sgt, in tegra_bo_unpin()
166 dma_buf_detach(map->attach->dmabuf, map->attach); in tegra_bo_unpin()
450 struct dma_buf_attachment *attach; in tegra_bo_import() local
458 attach = dma_buf_attach(buf, drm->dev); in tegra_bo_import()
[all …]
/Linux-v6.6/Documentation/bpf/libbpf/
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
190 .. [#fentry] The ``fentry`` attach format is ``fentry[.s]/<function>``.
191 .. [#kprobe] The ``kprobe`` attach format is ``kprobe/<function>[+<offset>]``. Valid
194 .. [#ksyscall] The ``ksyscall`` attach format is ``ksyscall/<syscall>``.
195 .. [#uprobe] The ``uprobe`` attach format is ``uprobe[.s]/<path>:<function>[+<offset>]``.
196 .. [#usdt] The ``usdt`` attach format is ``usdt/<path>:<provider>:<name>``.
197 .. [#kpmulti] The ``kprobe.multi`` attach format is ``kprobe.multi/<pattern>`` where ``pattern``
201 .. [#rawtp] The ``raw_tp`` attach format is ``raw_tracepoint[.w]/<tracepoint>``.
202 .. [#tp] The ``tracepoint`` attach format is ``tracepoint/<category>/<name>``.
[all …]
/Linux-v6.6/tools/bpf/bpftool/Documentation/
Dbpftool-cgroup.rst22 { **show** | **list** | **tree** | **attach** | **detach** | **help** }
29 | **bpftool** **cgroup attach** *CGROUP* *ATTACH_TYPE* *PROG* [*ATTACH_FLAGS*]
52 Output will start with program ID followed by attach type,
53 attach flags and program name.
66 program ID, attach type, attach flags and program name.
72 **bpftool cgroup attach** *CGROUP* *ATTACH_TYPE* *PROG* [*ATTACH_FLAGS*]
73 Attach program *PROG* to the cgroup *CGROUP* with attach type
83 no attach flags or the **override** flag. Attaching another
84 program will release old program and attach the new one.
123 Detach *PROG* from the cgroup *CGROUP* and attach type
[all …]
Dbpftool-net.rst22 { **show** | **list** | **attach** | **detach** | **help** }
28 | **bpftool** **net attach** *ATTACH_TYPE* *PROG* **dev** *NAME* [ **overwrite** ]
63 **bpftool** **net attach** *ATTACH_TYPE* *PROG* **dev** *NAME* [ **overwrite** ]
78 *ATTACH_TYPE* previously used for attach must be specified.
157 | **# bpftool net attach xdpdrv id 16 dev enp6s0np0**
166 | **# bpftool net attach xdpdrv id 16 dev enp6s0np0**
167 | **# bpftool net attach xdpdrv id 20 dev enp6s0np0 overwrite**
176 | **# bpftool net attach xdpdrv id 16 dev enp6s0np0**
/Linux-v6.6/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-v6.6/drivers/vfio/
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-v6.6/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-v6.6/Documentation/bpf/
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
159 attach type pair in ``struct bpf_cgroup_storage_key`` as the key to the BPF map
[all …]
/Linux-v6.6/drivers/gpu/drm/armada/
Darmada_gem.c386 armada_gem_prime_map_dma_buf(struct dma_buf_attachment *attach, in armada_gem_prime_map_dma_buf() argument
389 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()
452 static void armada_gem_prime_unmap_dma_buf(struct dma_buf_attachment *attach, in armada_gem_prime_unmap_dma_buf() argument
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()
[all …]
/Linux-v6.6/include/drm/
Ddrm_prime.h71 struct dma_buf_attachment *attach);
73 struct dma_buf_attachment *attach);
74 struct sg_table *drm_gem_map_dma_buf(struct dma_buf_attachment *attach,
76 void drm_gem_unmap_dma_buf(struct dma_buf_attachment *attach,
/Linux-v6.6/security/apparmor/
Ddomain.c304 struct aa_attachment *attach = &profile->attach; in aa_xattrs_match() local
305 int size, value_size = 0, ret = attach->xattr_count; in aa_xattrs_match()
307 if (!bprm || !attach->xattr_count) in aa_xattrs_match()
312 state = aa_dfa_outofband_transition(attach->xmatch.dfa, state); in aa_xattrs_match()
315 for (i = 0; i < attach->xattr_count; i++) { in aa_xattrs_match()
316 size = vfs_getxattr_alloc(&nop_mnt_idmap, d, attach->xattrs[i], in aa_xattrs_match()
326 state = aa_dfa_null_transition(attach->xmatch.dfa, in aa_xattrs_match()
329 state = aa_dfa_match_len(attach->xmatch.dfa, state, in aa_xattrs_match()
331 index = ACCEPT_TABLE(attach->xmatch.dfa)[state]; in aa_xattrs_match()
332 perm = attach->xmatch.perms[index].allow; in aa_xattrs_match()
[all …]
/Linux-v6.6/samples/bpf/
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>>...22