Displaying 20 results from an estimated 151 matches for "dma_free_coherent".
2013 Aug 23
1
[PATCH] VMXNET3: Add support for virtual IOMMU
...@ -429,25 +429,29 @@ vmxnet3_tq_destroy(struct vmxnet3_tx_queue *tq,
struct vmxnet3_adapter *adapter)
{
if (tq->tx_ring.base) {
- pci_free_consistent(adapter->pdev, tq->tx_ring.size *
- sizeof(struct Vmxnet3_TxDesc),
- tq->tx_ring.base, tq->tx_ring.basePA);
+ dma_free_coherent(&adapter->pdev->dev, tq->tx_ring.size *
+ sizeof(struct Vmxnet3_TxDesc),
+ tq->tx_ring.base, tq->tx_ring.basePA);
tq->tx_ring.base = NULL;
}
if (tq->data_ring.base) {
- pci_free_consistent(adapter->pdev, tq->data_ring.size *
- sizeof(struct Vm...
2013 Aug 23
1
[PATCH] VMXNET3: Add support for virtual IOMMU
...@ -429,25 +429,29 @@ vmxnet3_tq_destroy(struct vmxnet3_tx_queue *tq,
struct vmxnet3_adapter *adapter)
{
if (tq->tx_ring.base) {
- pci_free_consistent(adapter->pdev, tq->tx_ring.size *
- sizeof(struct Vmxnet3_TxDesc),
- tq->tx_ring.base, tq->tx_ring.basePA);
+ dma_free_coherent(&adapter->pdev->dev, tq->tx_ring.size *
+ sizeof(struct Vmxnet3_TxDesc),
+ tq->tx_ring.base, tq->tx_ring.basePA);
tq->tx_ring.base = NULL;
}
if (tq->data_ring.base) {
- pci_free_consistent(adapter->pdev, tq->data_ring.size *
- sizeof(struct Vm...
2014 Aug 27
2
[PATCH 3/3] virtio_pci: Use the DMA API for virtqueues
...t; vp_dev->ioaddr + VIRTIO_PCI_QUEUE_PFN);
>
> /* create the vring */
> @@ -462,7 +464,8 @@ out_assign:
> vring_del_virtqueue(vq);
> out_activate_queue:
> iowrite32(0, vp_dev->ioaddr + VIRTIO_PCI_QUEUE_PFN);
> - free_pages_exact(info->queue, size);
> + dma_free_coherent(vdev->dev.parent, size,
> + info->queue, info->queue_dma_addr);
> out_info:
> kfree(info);
> return ERR_PTR(err);
> @@ -493,7 +496,8 @@ static void vp_del_vq(struct virtqueue *vq)
> iowrite32(0, vp_dev->ioaddr + VIRTIO_PCI_QUEUE_PFN);
>
> size = PA...
2014 Aug 27
2
[PATCH 3/3] virtio_pci: Use the DMA API for virtqueues
...t; vp_dev->ioaddr + VIRTIO_PCI_QUEUE_PFN);
>
> /* create the vring */
> @@ -462,7 +464,8 @@ out_assign:
> vring_del_virtqueue(vq);
> out_activate_queue:
> iowrite32(0, vp_dev->ioaddr + VIRTIO_PCI_QUEUE_PFN);
> - free_pages_exact(info->queue, size);
> + dma_free_coherent(vdev->dev.parent, size,
> + info->queue, info->queue_dma_addr);
> out_info:
> kfree(info);
> return ERR_PTR(err);
> @@ -493,7 +496,8 @@ static void vp_del_vq(struct virtqueue *vq)
> iowrite32(0, vp_dev->ioaddr + VIRTIO_PCI_QUEUE_PFN);
>
> size = PA...
2019 May 10
3
[PATCH 05/10] s390/cio: introduce DMA pools to cio
On Fri, 10 May 2019 00:11:12 +0200
Halil Pasic <pasic at linux.ibm.com> wrote:
> On Thu, 9 May 2019 12:11:06 +0200
> Cornelia Huck <cohuck at redhat.com> wrote:
>
> > On Wed, 8 May 2019 23:22:10 +0200
> > Halil Pasic <pasic at linux.ibm.com> wrote:
> >
> > > On Wed, 8 May 2019 15:18:10 +0200 (CEST)
> > > Sebastian Ott <sebott
2019 May 10
3
[PATCH 05/10] s390/cio: introduce DMA pools to cio
On Fri, 10 May 2019 00:11:12 +0200
Halil Pasic <pasic at linux.ibm.com> wrote:
> On Thu, 9 May 2019 12:11:06 +0200
> Cornelia Huck <cohuck at redhat.com> wrote:
>
> > On Wed, 8 May 2019 23:22:10 +0200
> > Halil Pasic <pasic at linux.ibm.com> wrote:
> >
> > > On Wed, 8 May 2019 15:18:10 +0200 (CEST)
> > > Sebastian Ott <sebott
2019 May 13
2
[PATCH 05/10] s390/cio: introduce DMA pools to cio
...cio_dma_zalloc(size);
> if (!iv->vector)
> goto out_free;
> if (flags & AIRQ_IV_ALLOC) {
> @@ -172,8 +171,7 @@ struct airq_iv *airq_iv_create(unsigned long bits, unsigned long flags)
> kfree(iv->ptr);
> kfree(iv->bitlock);
> kfree(iv->avail);
> - dma_free_coherent(cio_get_dma_css_dev(), size, iv->vector,
> - iv->vector_dma);
> + cio_dma_free(iv->vector, size);
> kfree(iv);
> out:
> return NULL;
> @@ -189,9 +187,7 @@ void airq_iv_release(struct airq_iv *iv)
> kfree(iv->data);
> kfree(iv->ptr);
> kfree(i...
2019 May 13
2
[PATCH 05/10] s390/cio: introduce DMA pools to cio
...cio_dma_zalloc(size);
> if (!iv->vector)
> goto out_free;
> if (flags & AIRQ_IV_ALLOC) {
> @@ -172,8 +171,7 @@ struct airq_iv *airq_iv_create(unsigned long bits, unsigned long flags)
> kfree(iv->ptr);
> kfree(iv->bitlock);
> kfree(iv->avail);
> - dma_free_coherent(cio_get_dma_css_dev(), size, iv->vector,
> - iv->vector_dma);
> + cio_dma_free(iv->vector, size);
> kfree(iv);
> out:
> return NULL;
> @@ -189,9 +187,7 @@ void airq_iv_release(struct airq_iv *iv)
> kfree(iv->data);
> kfree(iv->ptr);
> kfree(i...
2019 May 12
0
[PATCH 05/10] s390/cio: introduce DMA pools to cio
...tor_dma, GFP_KERNEL);
+ iv->vector = cio_dma_zalloc(size);
if (!iv->vector)
goto out_free;
if (flags & AIRQ_IV_ALLOC) {
@@ -172,8 +171,7 @@ struct airq_iv *airq_iv_create(unsigned long bits, unsigned long flags)
kfree(iv->ptr);
kfree(iv->bitlock);
kfree(iv->avail);
- dma_free_coherent(cio_get_dma_css_dev(), size, iv->vector,
- iv->vector_dma);
+ cio_dma_free(iv->vector, size);
kfree(iv);
out:
return NULL;
@@ -189,9 +187,7 @@ void airq_iv_release(struct airq_iv *iv)
kfree(iv->data);
kfree(iv->ptr);
kfree(iv->bitlock);
- kfree(iv->vector);
- dma...
2009 Sep 24
7
scsi passthrough in pvops kernel
pvscsi appears to be missing from the pvops kernel. Is there a specific
reason for this or has it just not been done yet?
James
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
2012 Sep 24
2
[PATCHv4] virtio_console: Add support for remoteproc serial
...rgmann <arnd at arndb.de>
---
Changes since v3 are mostly related to freeing of dma-buffers:
- Change port_fops_write() to use struct port_buffer when allocating
memory. This is done in order to store the dma-address of the
allocated buffers, so the correct dma-address can be passed to
dma_free_coherent().
- Added pending_free_list for port_buf. dma_free_coherent() requires
the irqs to be enabled, so if irqs are disabled we queue the buffer
on the pending_free_list and free it later when irqs are enabled.
- Remove #if around is_rproc_serial
Thanks,
Sjur
drivers/char/virtio_console.c | 222...
2012 Sep 24
2
[PATCHv4] virtio_console: Add support for remoteproc serial
...rgmann <arnd at arndb.de>
---
Changes since v3 are mostly related to freeing of dma-buffers:
- Change port_fops_write() to use struct port_buffer when allocating
memory. This is done in order to store the dma-address of the
allocated buffers, so the correct dma-address can be passed to
dma_free_coherent().
- Added pending_free_list for port_buf. dma_free_coherent() requires
the irqs to be enabled, so if irqs are disabled we queue the buffer
on the pending_free_list and free it later when irqs are enabled.
- Remove #if around is_rproc_serial
Thanks,
Sjur
drivers/char/virtio_console.c | 222...
2016 Oct 11
2
[PATCH] virtio: console: Unlock vqs while freeing buffers
Commit c6017e793b93 ("virtio: console: add locks around buffer removal
in port unplug path") added locking around the freeing of buffers in the
vq. However, when free_buf() is called with can_sleep = true and rproc
is enabled, it calls dma_free_coherent() directly, requiring interrupts
to be enabled. Currently a WARNING is triggered due to the spin locking
around free_buf, with a call stack like this:
WARNING: CPU: 3 PID: 121 at ./include/linux/dma-mapping.h:433
free_buf+0x1a8/0x288
Call Trace:
[<8040c538>] show_stack+0x74/0xc0
[<8075724...
2016 Oct 11
2
[PATCH] virtio: console: Unlock vqs while freeing buffers
Commit c6017e793b93 ("virtio: console: add locks around buffer removal
in port unplug path") added locking around the freeing of buffers in the
vq. However, when free_buf() is called with can_sleep = true and rproc
is enabled, it calls dma_free_coherent() directly, requiring interrupts
to be enabled. Currently a WARNING is triggered due to the spin locking
around free_buf, with a call stack like this:
WARNING: CPU: 3 PID: 121 at ./include/linux/dma-mapping.h:433
free_buf+0x1a8/0x288
Call Trace:
[<8040c538>] show_stack+0x74/0xc0
[<8075724...
2019 May 15
0
[PATCH 05/10] s390/cio: introduce DMA pools to cio
...v->vector)
> > goto out_free;
> > if (flags & AIRQ_IV_ALLOC) {
> > @@ -172,8 +171,7 @@ struct airq_iv *airq_iv_create(unsigned long bits, unsigned long flags)
> > kfree(iv->ptr);
> > kfree(iv->bitlock);
> > kfree(iv->avail);
> > - dma_free_coherent(cio_get_dma_css_dev(), size, iv->vector,
> > - iv->vector_dma);
> > + cio_dma_free(iv->vector, size);
> > kfree(iv);
> > out:
> > return NULL;
> > @@ -189,9 +187,7 @@ void airq_iv_release(struct airq_iv *iv)
> > kfree(iv->data);
>...
2015 Feb 17
1
[PATCH v3 4/6] instmem/gk20a: use DMA attributes
...void *cpuaddr;
> dma_addr_t handle;
> + struct dma_attrs attrs;
> struct nvkm_mm_node r;
> };
>
> @@ -91,8 +96,8 @@ gk20a_instobj_dtor(struct nvkm_object *object)
> if (unlikely(!node->handle))
> return;
>
> - dma_free_coherent(dev, node->mem->size << PAGE_SHIFT, node->cpuaddr,
> - node->handle);
> + dma_free_attrs(dev, node->mem->size << PAGE_SHIFT, node->cpuaddr,
> + node->handle, &node->attrs);
>
> nvkm_...
2014 Sep 17
4
[PATCH v5 2/3] virtio_pci: Use the DMA API for virtqueues when possible
...k, name);
> if (!vq) {
> err = -ENOMEM;
> @@ -463,7 +518,12 @@ out_assign:
> vring_del_virtqueue(vq);
> out_activate_queue:
> iowrite32(0, vp_dev->ioaddr + VIRTIO_PCI_QUEUE_PFN);
> - free_pages_exact(info->queue, size);
> + if (info->use_dma_api) {
> + dma_free_coherent(vdev->dev.parent, size,
> + info->queue, info->queue_dma_addr);
> + } else {
> + free_pages_exact(info->queue, PAGE_ALIGN(size));
> + }
> out_info:
> kfree(info);
> return ERR_PTR(err);
> @@ -493,8 +553,13 @@ static void vp_del_vq(struct virtqueue *vq)...
2014 Sep 17
4
[PATCH v5 2/3] virtio_pci: Use the DMA API for virtqueues when possible
...k, name);
> if (!vq) {
> err = -ENOMEM;
> @@ -463,7 +518,12 @@ out_assign:
> vring_del_virtqueue(vq);
> out_activate_queue:
> iowrite32(0, vp_dev->ioaddr + VIRTIO_PCI_QUEUE_PFN);
> - free_pages_exact(info->queue, size);
> + if (info->use_dma_api) {
> + dma_free_coherent(vdev->dev.parent, size,
> + info->queue, info->queue_dma_addr);
> + } else {
> + free_pages_exact(info->queue, PAGE_ALIGN(size));
> + }
> out_info:
> kfree(info);
> return ERR_PTR(err);
> @@ -493,8 +553,13 @@ static void vp_del_vq(struct virtqueue *vq)...
2014 Sep 17
1
[PATCH v5 2/3] virtio_pci: Use the DMA API for virtqueues when possible
...k, name);
> if (!vq) {
> err = -ENOMEM;
> @@ -463,7 +518,12 @@ out_assign:
> vring_del_virtqueue(vq);
> out_activate_queue:
> iowrite32(0, vp_dev->ioaddr + VIRTIO_PCI_QUEUE_PFN);
> - free_pages_exact(info->queue, size);
> + if (info->use_dma_api) {
> + dma_free_coherent(vdev->dev.parent, size,
> + info->queue, info->queue_dma_addr);
> + } else {
> + free_pages_exact(info->queue, PAGE_ALIGN(size));
> + }
> out_info:
> kfree(info);
> return ERR_PTR(err);
> @@ -493,8 +553,13 @@ static void vp_del_vq(struct virtqueue *vq)...
2014 Sep 17
1
[PATCH v5 2/3] virtio_pci: Use the DMA API for virtqueues when possible
...k, name);
> if (!vq) {
> err = -ENOMEM;
> @@ -463,7 +518,12 @@ out_assign:
> vring_del_virtqueue(vq);
> out_activate_queue:
> iowrite32(0, vp_dev->ioaddr + VIRTIO_PCI_QUEUE_PFN);
> - free_pages_exact(info->queue, size);
> + if (info->use_dma_api) {
> + dma_free_coherent(vdev->dev.parent, size,
> + info->queue, info->queue_dma_addr);
> + } else {
> + free_pages_exact(info->queue, PAGE_ALIGN(size));
> + }
> out_info:
> kfree(info);
> return ERR_PTR(err);
> @@ -493,8 +553,13 @@ static void vp_del_vq(struct virtqueue *vq)...