Displaying 20 results from an estimated 91 matches for "out_activate_queu".
Did you mean:
out_activate_queue
2014 Aug 27
2
[PATCH 3/3] virtio_pci: Use the DMA API for virtqueues
...s(info->queue) >> VIRTIO_PCI_QUEUE_ADDR_SHIFT,
> + iowrite32(info->queue_dma_addr >> VIRTIO_PCI_QUEUE_ADDR_SHIFT,
> 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 +49...
2014 Aug 27
2
[PATCH 3/3] virtio_pci: Use the DMA API for virtqueues
...s(info->queue) >> VIRTIO_PCI_QUEUE_ADDR_SHIFT,
> + iowrite32(info->queue_dma_addr >> VIRTIO_PCI_QUEUE_ADDR_SHIFT,
> 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 +49...
2014 Dec 03
1
[PATCH RFC 1/2] virtio_pci: free up vq->priv
...pinlock_t lock;
struct list_head virtqueues;
+ /* array of all queues for house-keeping */
+ struct virtio_pci_vq_info **vqs;
+
/* MSI-X support */
int msix_enabled;
int intx_enabled;
@@ -429,7 +432,6 @@ static struct virtqueue *setup_vq(struct virtio_device *vdev, unsigned index,
goto out_activate_queue;
}
- vq->priv = info;
info->vq = vq;
if (msix_vec != VIRTIO_MSI_NO_VECTOR) {
@@ -449,6 +451,7 @@ static struct virtqueue *setup_vq(struct virtio_device *vdev, unsigned index,
INIT_LIST_HEAD(&info->node);
}
+ vp_dev->vqs[index] = info;
return vq;
out_assign:
@@...
2014 Dec 03
1
[PATCH RFC 1/2] virtio_pci: free up vq->priv
...pinlock_t lock;
struct list_head virtqueues;
+ /* array of all queues for house-keeping */
+ struct virtio_pci_vq_info **vqs;
+
/* MSI-X support */
int msix_enabled;
int intx_enabled;
@@ -429,7 +432,6 @@ static struct virtqueue *setup_vq(struct virtio_device *vdev, unsigned index,
goto out_activate_queue;
}
- vq->priv = info;
info->vq = vq;
if (msix_vec != VIRTIO_MSI_NO_VECTOR) {
@@ -449,6 +451,7 @@ static struct virtqueue *setup_vq(struct virtio_device *vdev, unsigned index,
INIT_LIST_HEAD(&info->node);
}
+ vp_dev->vqs[index] = info;
return vq;
out_assign:
@@...
2014 Dec 08
0
[PATCH v2 06/10] virtio_pci: setup vqs indirectly
...- info->vq = vq;
if (msix_vec != VIRTIO_MSI_NO_VECTOR) {
iowrite16(msix_vec, vp_dev->ioaddr + VIRTIO_MSI_QUEUE_VECTOR);
@@ -449,6 +447,35 @@ static struct virtqueue *setup_vq(struct virtio_device *vdev, unsigned index,
}
}
+ return vq;
+
+out_assign:
+ vring_del_virtqueue(vq);
+out_activate_queue:
+ iowrite32(0, vp_dev->ioaddr + VIRTIO_PCI_QUEUE_PFN);
+ free_pages_exact(info->queue, size);
+ return ERR_PTR(err);
+}
+
+static struct virtqueue *vp_setup_vq(struct virtio_device *vdev, unsigned index,
+ void (*callback)(struct virtqueue *vq),
+ const char *name,
+...
2014 Dec 08
0
[PATCH v2 06/10] virtio_pci: setup vqs indirectly
...- info->vq = vq;
if (msix_vec != VIRTIO_MSI_NO_VECTOR) {
iowrite16(msix_vec, vp_dev->ioaddr + VIRTIO_MSI_QUEUE_VECTOR);
@@ -449,6 +447,35 @@ static struct virtqueue *setup_vq(struct virtio_device *vdev, unsigned index,
}
}
+ return vq;
+
+out_assign:
+ vring_del_virtqueue(vq);
+out_activate_queue:
+ iowrite32(0, vp_dev->ioaddr + VIRTIO_PCI_QUEUE_PFN);
+ free_pages_exact(info->queue, size);
+ return ERR_PTR(err);
+}
+
+static struct virtqueue *vp_setup_vq(struct virtio_device *vdev, unsigned index,
+ void (*callback)(struct virtqueue *vq),
+ const char *name,
+...
2014 Dec 08
11
[PATCH 0/9] virtio_pci: split out legacy device support
virtio 1.0 support for virtio-pci isn't ready yet.
Therefore, this patchset doesn't make any functional changes.
Instead, this simply refactors virtio-pci, splitting legacy
device support code out to a separate file: virtio_pci_legacy.c
For virtio 1.0, all that's left is to add virtio_pci_modern.c
supporting
get_features
finalize_features
get (config)
set (config)
get_status
2014 Dec 08
11
[PATCH 0/9] virtio_pci: split out legacy device support
virtio 1.0 support for virtio-pci isn't ready yet.
Therefore, this patchset doesn't make any functional changes.
Instead, this simply refactors virtio-pci, splitting legacy
device support code out to a separate file: virtio_pci_legacy.c
For virtio 1.0, all that's left is to add virtio_pci_modern.c
supporting
get_features
finalize_features
get (config)
set (config)
get_status
2014 Dec 08
0
[PATCH v2 08/10] virtio_pci: split out legacy device support
...VIRTIO_PCI_QUEUE_ADDR_SHIFT,
- vp_dev->ioaddr + VIRTIO_PCI_QUEUE_PFN);
-
- /* create the vring */
- vq = vring_new_virtqueue(index, info->num,
- VIRTIO_PCI_VRING_ALIGN, &vp_dev->vdev,
- true, info->queue, vp_notify, callback, name);
- if (!vq) {
- err = -ENOMEM;
- goto out_activate_queue;
- }
-
- vq->priv = (void __force *)vp_dev->ioaddr + VIRTIO_PCI_QUEUE_NOTIFY;
-
- if (msix_vec != VIRTIO_MSI_NO_VECTOR) {
- iowrite16(msix_vec, vp_dev->ioaddr + VIRTIO_MSI_QUEUE_VECTOR);
- msix_vec = ioread16(vp_dev->ioaddr + VIRTIO_MSI_QUEUE_VECTOR);
- if (msix_vec == VIRTIO_MSI_NO...
2014 Dec 08
0
[PATCH v2 08/10] virtio_pci: split out legacy device support
...VIRTIO_PCI_QUEUE_ADDR_SHIFT,
- vp_dev->ioaddr + VIRTIO_PCI_QUEUE_PFN);
-
- /* create the vring */
- vq = vring_new_virtqueue(index, info->num,
- VIRTIO_PCI_VRING_ALIGN, &vp_dev->vdev,
- true, info->queue, vp_notify, callback, name);
- if (!vq) {
- err = -ENOMEM;
- goto out_activate_queue;
- }
-
- vq->priv = (void __force *)vp_dev->ioaddr + VIRTIO_PCI_QUEUE_NOTIFY;
-
- if (msix_vec != VIRTIO_MSI_NO_VECTOR) {
- iowrite16(msix_vec, vp_dev->ioaddr + VIRTIO_MSI_QUEUE_VECTOR);
- msix_vec = ioread16(vp_dev->ioaddr + VIRTIO_MSI_QUEUE_VECTOR);
- if (msix_vec == VIRTIO_MSI_NO...
2014 Dec 08
0
[PATCH 8/9] virtio_pci: split out legacy device support
...VIRTIO_PCI_QUEUE_ADDR_SHIFT,
- vp_dev->ioaddr + VIRTIO_PCI_QUEUE_PFN);
-
- /* create the vring */
- vq = vring_new_virtqueue(index, info->num,
- VIRTIO_PCI_VRING_ALIGN, &vp_dev->vdev,
- true, info->queue, vp_notify, callback, name);
- if (!vq) {
- err = -ENOMEM;
- goto out_activate_queue;
- }
-
- vq->priv = (void __force *)vp_dev->ioaddr + VIRTIO_PCI_QUEUE_NOTIFY;
-
- if (msix_vec != VIRTIO_MSI_NO_VECTOR) {
- iowrite16(msix_vec, vp_dev->ioaddr + VIRTIO_MSI_QUEUE_VECTOR);
- msix_vec = ioread16(vp_dev->ioaddr + VIRTIO_MSI_QUEUE_VECTOR);
- if (msix_vec == VIRTIO_MSI_NO...
2014 Dec 08
0
[PATCH 8/9] virtio_pci: split out legacy device support
...VIRTIO_PCI_QUEUE_ADDR_SHIFT,
- vp_dev->ioaddr + VIRTIO_PCI_QUEUE_PFN);
-
- /* create the vring */
- vq = vring_new_virtqueue(index, info->num,
- VIRTIO_PCI_VRING_ALIGN, &vp_dev->vdev,
- true, info->queue, vp_notify, callback, name);
- if (!vq) {
- err = -ENOMEM;
- goto out_activate_queue;
- }
-
- vq->priv = (void __force *)vp_dev->ioaddr + VIRTIO_PCI_QUEUE_NOTIFY;
-
- if (msix_vec != VIRTIO_MSI_NO_VECTOR) {
- iowrite16(msix_vec, vp_dev->ioaddr + VIRTIO_MSI_QUEUE_VECTOR);
- msix_vec = ioread16(vp_dev->ioaddr + VIRTIO_MSI_QUEUE_VECTOR);
- if (msix_vec == VIRTIO_MSI_NO...
2014 Sep 17
4
[PATCH v5 2/3] virtio_pci: Use the DMA API for virtqueues when possible
...dex, info->num, VIRTIO_PCI_VRING_ALIGN, vdev,
> - true, false, info->queue,
> + true, info->use_dma_api, info->queue,
> vp_notify, callback, 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...
2014 Sep 17
4
[PATCH v5 2/3] virtio_pci: Use the DMA API for virtqueues when possible
...dex, info->num, VIRTIO_PCI_VRING_ALIGN, vdev,
> - true, false, info->queue,
> + true, info->use_dma_api, info->queue,
> vp_notify, callback, 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...
2014 Sep 17
1
[PATCH v5 2/3] virtio_pci: Use the DMA API for virtqueues when possible
...dex, info->num, VIRTIO_PCI_VRING_ALIGN, vdev,
> - true, false, info->queue,
> + true, info->use_dma_api, info->queue,
> vp_notify, callback, 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...
2014 Sep 17
1
[PATCH v5 2/3] virtio_pci: Use the DMA API for virtqueues when possible
...dex, info->num, VIRTIO_PCI_VRING_ALIGN, vdev,
> - true, false, info->queue,
> + true, info->use_dma_api, info->queue,
> vp_notify, callback, 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...
2014 Aug 26
0
[PATCH 3/3] virtio_pci: Use the DMA API for virtqueues
...he queue */
- iowrite32(virt_to_phys(info->queue) >> VIRTIO_PCI_QUEUE_ADDR_SHIFT,
+ iowrite32(info->queue_dma_addr >> VIRTIO_PCI_QUEUE_ADDR_SHIFT,
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 virt...
2014 Dec 08
0
[PATCH v2 04/10] virtio_pci: use priv for vq notification
...tion register to
* signal the other end */
- iowrite16(vq->index, vp_dev->ioaddr + VIRTIO_PCI_QUEUE_NOTIFY);
+ iowrite16(vq->index, (void __iomem *)vq->priv);
return true;
}
@@ -437,6 +435,7 @@ static struct virtqueue *setup_vq(struct virtio_device *vdev, unsigned index,
goto out_activate_queue;
}
+ vq->priv = (void __force *)vp_dev->ioaddr + VIRTIO_PCI_QUEUE_NOTIFY;
info->vq = vq;
if (msix_vec != VIRTIO_MSI_NO_VECTOR) {
--
MST
2014 Dec 08
0
[PATCH v2 04/10] virtio_pci: use priv for vq notification
...tion register to
* signal the other end */
- iowrite16(vq->index, vp_dev->ioaddr + VIRTIO_PCI_QUEUE_NOTIFY);
+ iowrite16(vq->index, (void __iomem *)vq->priv);
return true;
}
@@ -437,6 +435,7 @@ static struct virtqueue *setup_vq(struct virtio_device *vdev, unsigned index,
goto out_activate_queue;
}
+ vq->priv = (void __force *)vp_dev->ioaddr + VIRTIO_PCI_QUEUE_NOTIFY;
info->vq = vq;
if (msix_vec != VIRTIO_MSI_NO_VECTOR) {
--
MST
2014 Aug 27
0
[PATCH 3/3] virtio_pci: Use the DMA API for virtqueues
...SHIFT,
>> + iowrite32(info->queue_dma_addr >> VIRTIO_PCI_QUEUE_ADDR_SHIFT,
>> 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:
>> k...