search for: dma_none

Displaying 20 results from an estimated 71 matches for "dma_none".

2013 Oct 25
2
[PATCH] vhost/scsi: Fix incorrect usage of get_user_pages_fast write parameter
...anged, 1 insertions(+), 1 deletions(-) diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c index ce5221f..e663921 100644 --- a/drivers/vhost/scsi.c +++ b/drivers/vhost/scsi.c @@ -1056,7 +1056,7 @@ vhost_scsi_handle_vq(struct vhost_scsi *vs, struct vhost_virtqueue *vq) if (data_direction != DMA_NONE) { ret = vhost_scsi_map_iov_to_sgl(cmd, &vq->iov[data_first], data_num, - data_direction == DMA_TO_DEVICE); + data_direction == DMA_FROM_DEVICE); if (unlikely(ret)) { vq_err(vq, "Failed to map iov to sgl\n"); goto err_free; -- 1.7.2.5
2013 Oct 25
2
[PATCH] vhost/scsi: Fix incorrect usage of get_user_pages_fast write parameter
...anged, 1 insertions(+), 1 deletions(-) diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c index ce5221f..e663921 100644 --- a/drivers/vhost/scsi.c +++ b/drivers/vhost/scsi.c @@ -1056,7 +1056,7 @@ vhost_scsi_handle_vq(struct vhost_scsi *vs, struct vhost_virtqueue *vq) if (data_direction != DMA_NONE) { ret = vhost_scsi_map_iov_to_sgl(cmd, &vq->iov[data_first], data_num, - data_direction == DMA_TO_DEVICE); + data_direction == DMA_FROM_DEVICE); if (unlikely(ret)) { vq_err(vq, "Failed to map iov to sgl\n"); goto err_free; -- 1.7.2.5
2020 Aug 19
0
[PATCH 08/28] MIPS: make dma_sync_*_for_cpu a little less overzealous
...ze, enum dma_data_direction dir) { if (cpu_needs_post_dma_flush()) - dma_sync_phys(paddr, size, dir); + dma_sync_phys(paddr, size, dir, false); } #endif void arch_dma_cache_sync(struct device *dev, void *vaddr, size_t size, enum dma_data_direction direction) { - BUG_ON(direction == DMA_NONE); - - dma_sync_virt(vaddr, size, direction); + dma_sync_virt_for_device(vaddr, size, direction); } #ifdef CONFIG_DMA_PERDEV_COHERENT -- 2.28.0
2008 Dec 22
17
[PATCH 0 of 9] swiotlb: use phys_addr_t for pages
Hi all, Here''s a work in progress series whcih does a partial revert of the previous swiotlb changes, and does a partial replacement with Becky Bruce''s series. The most important difference is Becky''s use of phys_addr_t rather than page+offset to represent arbitrary pages. This turns out to be simpler. I didn''t replicate the map_single_page changes, since
2023 May 19
1
[PATCH 2/4] x86: always initialize xen-swiotlb when xen-pcifront is enabling
On Fri, May 19, 2023 at 01:49:46PM +0100, Andrew Cooper wrote: > > The alternative would be to finally merge swiotlb-xen into swiotlb, in > > which case we might be able to do this later. Let me see what I can > > do there. > > If that is an option, it would be great to reduce the special-cashing. I think it's doable, and I've been wanting it for a while. I just
2013 Oct 17
42
[PATCH v8 0/19] enable swiotlb-xen on arm and arm64
Hi all, this patch series enables xen-swiotlb on arm and arm64. It has been heavily reworked compared to the previous versions in order to achieve better performances and to address review comments. We are not using dma_mark_clean to ensure coherency anymore. We call the platform implementation of map_page and unmap_page. We assume that dom0 has been mapped 1:1 (physical address == machine
2019 Dec 21
0
[PATCH 2/8] iommu/vt-d: Use default dma_direct_* mapping functions for direct mapped devices
..._sg(dev, sglist, nelems, dir, attrs); - for_each_sg(sglist, sg, nelems, i) { nrpages += aligned_nrpages(sg_dma_address(sg), sg_dma_len(sg)); } @@ -3699,8 +3662,6 @@ static int intel_map_sg(struct device *dev, struct scatterlist *sglist, int nele struct intel_iommu *iommu; BUG_ON(dir == DMA_NONE); - if (iommu_no_mapping(dev)) - return dma_direct_map_sg(dev, sglist, nelems, dir, attrs); domain = deferred_attach_domain(dev); if (!domain) @@ -3747,8 +3708,6 @@ static int intel_map_sg(struct device *dev, struct scatterlist *sglist, int nele static u64 intel_get_required_mask(struct d...
2020 Apr 29
0
[PATCH 1/5] swiotlb: Introduce concept of swiotlb_pool
...9c77df1 Joerg Roedel 2020-02-17 3957 do_deferred_attach(dev); a11bfde9c77df1 Joerg Roedel 2020-02-17 3958 96d170f3b1a607 Joerg Roedel 2020-02-17 3959 domain = find_domain(dev); a11bfde9c77df1 Joerg Roedel 2020-02-17 3960 cfb94a372f2d4e Lu Baolu 2019-09-06 3961 if (WARN_ON(dir == DMA_NONE || !domain)) cfb94a372f2d4e Lu Baolu 2019-09-06 3962 return DMA_MAPPING_ERROR; cfb94a372f2d4e Lu Baolu 2019-09-06 3963 cfb94a372f2d4e Lu Baolu 2019-09-06 3964 iommu = domain_get_iommu(domain); cfb94a372f2d4e Lu Baolu 2019-09-06 3965 if (WARN_ON(!iommu)) cfb94a372f2d4e L...
2020 Aug 13
1
[PATCH 20/20] drm: Remove obsolete GEM and PRIME callbacks from struct drm_driver
...15 +612,18 @@ struct sg_table *drm_gem_map_dma_buf(struct dma_buf_attachment *attach, > enum dma_data_direction dir) > { > struct drm_gem_object *obj = attach->dmabuf->priv; > - struct sg_table *sgt; > + struct sg_table *sgt = NULL; > > if (WARN_ON(dir == DMA_NONE)) > return ERR_PTR(-EINVAL); > > - if (obj->funcs) > + if (obj->funcs && obj->funcs->get_sg_table) > sgt = obj->funcs->get_sg_table(obj); > - else > - sgt = obj->dev->driver->gem_prime_get_sg_table(obj); > + > + if (!sgt) > +...
2012 Jul 26
2
[RFC-v5] tcm_vhost: Initial merge for vhost level target fabric driver
...ntfd to tell us they refilled. */ + if (head == vq->num) { + if (unlikely(vhost_enable_notify(&vs->dev, vq))) { + vhost_disable_notify(&vs->dev, vq); + continue; + } + break; + } + +/* FIXME: BIDI operation */ + if (out == 1 && in == 1) { + data_direction = DMA_NONE; + data_first = 0; + data_num = 0; + } else if (out == 1 && in > 1) { + data_direction = DMA_FROM_DEVICE; + data_first = out + 1; + data_num = in - 1; + } else if (out > 1 && in == 1) { + data_direction = DMA_TO_DEVICE; + data_first = 1; + data_num = out - 1;...
2012 Jul 26
2
[RFC-v5] tcm_vhost: Initial merge for vhost level target fabric driver
...ntfd to tell us they refilled. */ + if (head == vq->num) { + if (unlikely(vhost_enable_notify(&vs->dev, vq))) { + vhost_disable_notify(&vs->dev, vq); + continue; + } + break; + } + +/* FIXME: BIDI operation */ + if (out == 1 && in == 1) { + data_direction = DMA_NONE; + data_first = 0; + data_num = 0; + } else if (out == 1 && in > 1) { + data_direction = DMA_FROM_DEVICE; + data_first = out + 1; + data_num = in - 1; + } else if (out > 1 && in == 1) { + data_direction = DMA_TO_DEVICE; + data_first = 1; + data_num = out - 1;...
2020 Aug 13
0
[PATCH 20/20] drm: Remove obsolete GEM and PRIME callbacks from struct drm_driver
...ile_priv, uint32_t handle, @@ -616,15 +612,18 @@ struct sg_table *drm_gem_map_dma_buf(struct dma_buf_attachment *attach, enum dma_data_direction dir) { struct drm_gem_object *obj = attach->dmabuf->priv; - struct sg_table *sgt; + struct sg_table *sgt = NULL; if (WARN_ON(dir == DMA_NONE)) return ERR_PTR(-EINVAL); - if (obj->funcs) + if (obj->funcs && obj->funcs->get_sg_table) sgt = obj->funcs->get_sg_table(obj); - else - sgt = obj->dev->driver->gem_prime_get_sg_table(obj); + + if (!sgt) + return ERR_PTR(-EINVAL); + else if (IS_ERR(sgt))...
2020 Sep 15
0
[PATCH v2 21/21] drm: Remove obsolete GEM and PRIME callbacks from struct drm_driver
...ile_priv, uint32_t handle, @@ -616,15 +612,18 @@ struct sg_table *drm_gem_map_dma_buf(struct dma_buf_attachment *attach, enum dma_data_direction dir) { struct drm_gem_object *obj = attach->dmabuf->priv; - struct sg_table *sgt; + struct sg_table *sgt = NULL; if (WARN_ON(dir == DMA_NONE)) return ERR_PTR(-EINVAL); - if (obj->funcs) + if (obj->funcs && obj->funcs->get_sg_table) sgt = obj->funcs->get_sg_table(obj); - else - sgt = obj->dev->driver->gem_prime_get_sg_table(obj); + + if (!sgt) + return ERR_PTR(-EINVAL); + else if (IS_ERR(sgt))...
2016 Feb 03
0
[PATCH v7 5/9] virtio_ring: Support DMA APIs
...0 +1,17 @@ +#ifndef _LINUX_DMA_MAPPING_H +#define _LINUX_DMA_MAPPING_H + +#ifdef CONFIG_HAS_DMA +# error Virtio userspace code does not support CONFIG_HAS_DMA +#endif + +#define PCI_DMA_BUS_IS_PHYS 1 + +enum dma_data_direction { + DMA_BIDIRECTIONAL = 0, + DMA_TO_DEVICE = 1, + DMA_FROM_DEVICE = 2, + DMA_NONE = 3, +}; + +#endif -- 2.5.0
2018 May 15
0
[PATCH 1/2] Convert target drivers to use sbitmap
...ag(se_sess, state, &cpu); if (tag < 0) return NULL; @@ -166,6 +190,7 @@ struct iscsi_cmd *iscsit_allocate_cmd(struct iscsi_conn *conn, int state) memset(cmd, 0, size); cmd->se_cmd.map_tag = tag; + cmd->se_cmd.map_cpu = cpu; cmd->conn = conn; cmd->data_direction = DMA_NONE; INIT_LIST_HEAD(&cmd->i_conn_node); @@ -711,7 +736,8 @@ void iscsit_release_cmd(struct iscsi_cmd *cmd) kfree(cmd->iov_data); kfree(cmd->text_in_ptr); - percpu_ida_free(&sess->se_sess->sess_tag_pool, se_cmd->map_tag); + sbitmap_queue_clear(&sess->se_sess->...
2023 May 24
4
[PATCH 0/3] vhost-scsi: Fix IO hangs when using windows
The following patches were made over Linus's tree and fix an issue where windows guests will send iovecs with offset/lengths that result in IOs that are not aligned to 512. The LIO layer will then send them to Linux's block layer but it requires 512 byte alignment, so depending on the block driver being used we will get IO errors or hung IO. The following patches have vhost-scsi detect
2019 Dec 21
13
[PATCH 0/8] Convert the intel iommu driver to the dma-iommu api
This patchset converts the intel iommu driver to the dma-iommu api. While converting the driver I exposed a bug in the intel i915 driver which causes a huge amount of artifacts on the screen of my laptop. You can see a picture of it here: https://github.com/pippy360/kernelPatches/blob/master/IMG_20191219_225922.jpg This issue is most likely in the i915 driver and is most likely caused by the
2019 Dec 21
13
[PATCH 0/8] Convert the intel iommu driver to the dma-iommu api
This patchset converts the intel iommu driver to the dma-iommu api. While converting the driver I exposed a bug in the intel i915 driver which causes a huge amount of artifacts on the screen of my laptop. You can see a picture of it here: https://github.com/pippy360/kernelPatches/blob/master/IMG_20191219_225922.jpg This issue is most likely in the i915 driver and is most likely caused by the
2016 Feb 03
1
[PATCH v7 5/9] virtio_ring: Support DMA APIs
..._MAPPING_H > + > +#ifdef CONFIG_HAS_DMA > +# error Virtio userspace code does not support CONFIG_HAS_DMA > +#endif > + > +#define PCI_DMA_BUS_IS_PHYS 1 > + > +enum dma_data_direction { > + DMA_BIDIRECTIONAL = 0, > + DMA_TO_DEVICE = 1, > + DMA_FROM_DEVICE = 2, > + DMA_NONE = 3, > +}; > + > +#endif > -- > 2.5.0
2016 Feb 03
1
[PATCH v7 5/9] virtio_ring: Support DMA APIs
..._MAPPING_H > + > +#ifdef CONFIG_HAS_DMA > +# error Virtio userspace code does not support CONFIG_HAS_DMA > +#endif > + > +#define PCI_DMA_BUS_IS_PHYS 1 > + > +enum dma_data_direction { > + DMA_BIDIRECTIONAL = 0, > + DMA_TO_DEVICE = 1, > + DMA_FROM_DEVICE = 2, > + DMA_NONE = 3, > +}; > + > +#endif > -- > 2.5.0