Displaying 20 results from an estimated 70 matches for "pci_irq_vector".
2017 Jan 27
0
[PATCH 2/9] virtio_pci: use shared interrupts for virtqueues
...mmon.c
@@ -33,10 +33,8 @@ void vp_synchronize_vectors(struct virtio_device *vdev)
struct virtio_pci_device *vp_dev = to_vp_device(vdev);
int i;
- if (vp_dev->intx_enabled)
- synchronize_irq(vp_dev->pci_dev->irq);
-
- for (i = 0; i < vp_dev->msix_vectors; ++i)
+ synchronize_irq(pci_irq_vector(vp_dev->pci_dev, 0));
+ for (i = 1; i < vp_dev->msix_vectors; i++)
synchronize_irq(pci_irq_vector(vp_dev->pci_dev, i));
}
@@ -99,77 +97,10 @@ static irqreturn_t vp_interrupt(int irq, void *opaque)
return vp_vring_interrupt(irq, opaque);
}
-static int vp_request_msix_vectors(s...
2017 Feb 05
0
[PATCH 2/9] virtio_pci: use shared interrupts for virtqueues
...mmon.c
@@ -33,10 +33,8 @@ void vp_synchronize_vectors(struct virtio_device *vdev)
struct virtio_pci_device *vp_dev = to_vp_device(vdev);
int i;
- if (vp_dev->intx_enabled)
- synchronize_irq(vp_dev->pci_dev->irq);
-
- for (i = 0; i < vp_dev->msix_vectors; ++i)
+ synchronize_irq(pci_irq_vector(vp_dev->pci_dev, 0));
+ for (i = 1; i < vp_dev->msix_vectors; i++)
synchronize_irq(pci_irq_vector(vp_dev->pci_dev, i));
}
@@ -99,77 +97,10 @@ static irqreturn_t vp_interrupt(int irq, void *opaque)
return vp_vring_interrupt(irq, opaque);
}
-static int vp_request_msix_vectors(s...
2016 Nov 06
8
virtio_pci irq handling cleanups
Hi Michael,
this series contains a couple cleanups for the virtio_pci interrupt
handling code, including a switch to the new pci_irq_alloc_vectors
helper. All these are in preparation of taking advantage of the new
PCI layer / core IRQ interrupt affinity handling, for which I will
send out a series once this and some core interrupt handling changes
are in.
2016 Nov 06
8
virtio_pci irq handling cleanups
Hi Michael,
this series contains a couple cleanups for the virtio_pci interrupt
handling code, including a switch to the new pci_irq_alloc_vectors
helper. All these are in preparation of taking advantage of the new
PCI layer / core IRQ interrupt affinity handling, for which I will
send out a series once this and some core interrupt handling changes
are in.
2017 Mar 08
3
[PATCH] virtio-pci: Remove affinity hint before freeing the interrupt
...--- a/drivers/virtio/virtio_pci_common.c
+++ b/drivers/virtio/virtio_pci_common.c
@@ -106,9 +106,12 @@ static void vp_remove_vqs(struct virtio_device *vdev)
if (vp_dev->msix_vector_map) {
int v = vp_dev->msix_vector_map[vq->index];
- if (v != VIRTIO_MSI_NO_VECTOR)
- free_irq(pci_irq_vector(vp_dev->pci_dev, v),
- vq);
+ if (v != VIRTIO_MSI_NO_VECTOR) {
+ unsigned int irq;
+ irq = pci_irq_vector(vp_dev->pci_dev, v);
+ irq_set_affinity_hint(irq, NULL);
+ free_irq(irq, vq);
+ }
}
vp_dev->del_vq(vq);
}
--
2.11.0
2017 Mar 08
3
[PATCH] virtio-pci: Remove affinity hint before freeing the interrupt
...--- a/drivers/virtio/virtio_pci_common.c
+++ b/drivers/virtio/virtio_pci_common.c
@@ -106,9 +106,12 @@ static void vp_remove_vqs(struct virtio_device *vdev)
if (vp_dev->msix_vector_map) {
int v = vp_dev->msix_vector_map[vq->index];
- if (v != VIRTIO_MSI_NO_VECTOR)
- free_irq(pci_irq_vector(vp_dev->pci_dev, v),
- vq);
+ if (v != VIRTIO_MSI_NO_VECTOR) {
+ unsigned int irq;
+ irq = pci_irq_vector(vp_dev->pci_dev, v);
+ irq_set_affinity_hint(irq, NULL);
+ free_irq(irq, vq);
+ }
}
vp_dev->del_vq(vq);
}
--
2.11.0
2016 Nov 17
13
automatic IRQ affinity for virtio
Hi Michael,
this series contains a couple cleanups for the virtio_pci interrupt
handling code, including a switch to the new pci_irq_alloc_vectors
helper, and support for automatic affinity by the PCI layer if the
consumers ask for it. It then converts over virtio_blk to use this
functionality so that it's blk-mq queues are aligned to the MSI-X
vector routing. I have a similar patch in the
2016 Nov 17
13
automatic IRQ affinity for virtio
Hi Michael,
this series contains a couple cleanups for the virtio_pci interrupt
handling code, including a switch to the new pci_irq_alloc_vectors
helper, and support for automatic affinity by the PCI layer if the
consumers ask for it. It then converts over virtio_blk to use this
functionality so that it's blk-mq queues are aligned to the MSI-X
vector routing. I have a similar patch in the
2017 Feb 05
13
automatic IRQ affinity for virtio V3
Hi Michael, hi Jason,
This patches applies a few cleanups to the virtio PCI interrupt handling
code, and then converts the virtio PCI code to use the automatic MSI-X
vectors spreading, as well as using the information in virtio-blk
and virtio-scsi to automatically align the blk-mq queues to the MSI-X
vectors.
Changes since V2:
- remove a redundant callback check
- calculate ->msix_vectors
2017 Feb 05
13
automatic IRQ affinity for virtio V3
Hi Michael, hi Jason,
This patches applies a few cleanups to the virtio PCI interrupt handling
code, and then converts the virtio PCI code to use the automatic MSI-X
vectors spreading, as well as using the information in virtio-blk
and virtio-scsi to automatically align the blk-mq queues to the MSI-X
vectors.
Changes since V2:
- remove a redundant callback check
- calculate ->msix_vectors
2017 Feb 03
2
[PATCH 2/9] virtio_pci: use shared interrupts for virtqueues
On 2017?01?27? 16:16, Christoph Hellwig wrote:
> + snprintf(vp_dev->msix_names[i + 1],
> + sizeof(*vp_dev->msix_names), "%s-%s",
> dev_name(&vp_dev->vdev.dev), names[i]);
> err = request_irq(pci_irq_vector(vp_dev->pci_dev, msix_vec),
> - vring_interrupt, 0,
> - vp_dev->msix_names[msix_vec],
> - vqs[i]);
> + vring_interrupt, IRQF_SHARED,
> + vp_dev->msix_names[i + 1], vqs[i]);
Do we need to check per_vq_vectors before dereferencing msix_names[i + 1] ?...
2017 Feb 03
2
[PATCH 2/9] virtio_pci: use shared interrupts for virtqueues
On 2017?01?27? 16:16, Christoph Hellwig wrote:
> + snprintf(vp_dev->msix_names[i + 1],
> + sizeof(*vp_dev->msix_names), "%s-%s",
> dev_name(&vp_dev->vdev.dev), names[i]);
> err = request_irq(pci_irq_vector(vp_dev->pci_dev, msix_vec),
> - vring_interrupt, 0,
> - vp_dev->msix_names[msix_vec],
> - vqs[i]);
> + vring_interrupt, IRQF_SHARED,
> + vp_dev->msix_names[i + 1], vqs[i]);
Do we need to check per_vq_vectors before dereferencing msix_names[i + 1] ?...
2017 Jan 27
15
automatic IRQ affinity for virtio V2
Hi Michael, hi Jason,
This patches applies a few cleanups to the virtio PCI interrupt handling
code, and then converts the virtio PCI code to use the automatic MSI-X
vectors spreading, as well as using the information in virtio-blk
and virtio-scsi to automatically align the blk-mq queues to the MSI-X
vectors.
Changes since V1:
- dropped the patches already merged for 4.10-rc
- new patch to
2017 Jan 27
15
automatic IRQ affinity for virtio V2
Hi Michael, hi Jason,
This patches applies a few cleanups to the virtio PCI interrupt handling
code, and then converts the virtio PCI code to use the automatic MSI-X
vectors spreading, as well as using the information in virtio-blk
and virtio-scsi to automatically align the blk-mq queues to the MSI-X
vectors.
Changes since V1:
- dropped the patches already merged for 4.10-rc
- new patch to
2020 Jul 15
2
[PATCH 6/7] ifcvf: replace irq_request/free with helpers in vDPA core.
...? int vector, i, ret, irq;
>>> ? ????? ret = pci_alloc_irq_vectors(pdev, IFCVF_MAX_INTR,
>>> @@ -73,6 +75,7 @@ static int ifcvf_request_irq(struct ifcvf_adapter
>>> *adapter)
>>> ?????????? pci_name(pdev));
>>> ????? vector = 0;
>>> ????? irq = pci_irq_vector(pdev, vector);
>>> +??? /* config interrupt */
>>
>>
>> Unnecessary changes.
> This is to show we did not setup this irq offloading for config
> interrupt, only setup irq offloading for data vq. But can remove this
> since we have config_msix_name in code to sh...
2020 Jul 15
2
[PATCH 6/7] ifcvf: replace irq_request/free with helpers in vDPA core.
...? int vector, i, ret, irq;
>>> ? ????? ret = pci_alloc_irq_vectors(pdev, IFCVF_MAX_INTR,
>>> @@ -73,6 +75,7 @@ static int ifcvf_request_irq(struct ifcvf_adapter
>>> *adapter)
>>> ?????????? pci_name(pdev));
>>> ????? vector = 0;
>>> ????? irq = pci_irq_vector(pdev, vector);
>>> +??? /* config interrupt */
>>
>>
>> Unnecessary changes.
> This is to show we did not setup this irq offloading for config
> interrupt, only setup irq offloading for data vq. But can remove this
> since we have config_msix_name in code to sh...
2017 Mar 08
0
[PATCH] virtio-pci: Remove affinity hint before freeing the interrupt
...mmon.c
> +++ b/drivers/virtio/virtio_pci_common.c
> @@ -106,9 +106,12 @@ static void vp_remove_vqs(struct virtio_device *vdev)
> if (vp_dev->msix_vector_map) {
> int v = vp_dev->msix_vector_map[vq->index];
>
> - if (v != VIRTIO_MSI_NO_VECTOR)
> - free_irq(pci_irq_vector(vp_dev->pci_dev, v),
> - vq);
> + if (v != VIRTIO_MSI_NO_VECTOR) {
> + unsigned int irq;
> + irq = pci_irq_vector(vp_dev->pci_dev, v);
> + irq_set_affinity_hint(irq, NULL);
> + free_irq(irq, vq);
> + }
> }
> vp_dev->del_vq(vq);
> }...
2020 Jul 13
0
[PATCH 6/7] ifcvf: replace irq_request/free with helpers in vDPA core.
...> + struct vdpa_device *vdpa = &adapter->vdpa;
> int vector, i, ret, irq;
>
> ret = pci_alloc_irq_vectors(pdev, IFCVF_MAX_INTR,
> @@ -73,6 +75,7 @@ static int ifcvf_request_irq(struct ifcvf_adapter *adapter)
> pci_name(pdev));
> vector = 0;
> irq = pci_irq_vector(pdev, vector);
> + /* config interrupt */
Unnecessary changes.
Thanks
> ret = devm_request_irq(&pdev->dev, irq,
> ifcvf_config_changed, 0,
> vf->config_msix_name, vf);
> @@ -82,13 +85,11 @@ static int ifcvf_request_irq(struct ifcvf_adapter *a...
2020 Jul 17
0
[PATCH V2 5/6] ifcvf: replace irq_request/free with vDPA helpers
...gt; + struct vdpa_device *vdpa = &adapter->vdpa;
> int vector, i, ret, irq;
>
> ret = pci_alloc_irq_vectors(pdev, IFCVF_MAX_INTR,
> @@ -73,6 +75,10 @@ static int ifcvf_request_irq(struct ifcvf_adapter *adapter)
> pci_name(pdev));
> vector = 0;
> irq = pci_irq_vector(pdev, vector);
> + /* This isconfig interrupt, config accesses all go
Missing a blank between is and config.
Thanks
> + * through userspace, so no need to setup
> + * config interrupt offloading.
> + */
> ret = devm_request_irq(&pdev->dev, irq,
> ifcv...
2017 Feb 07
2
[PATCH 1/9] virtio_pci: remove struct virtio_pci_vq_info
On 2017?02?06? 01:15, Christoph Hellwig wrote:
> We don't really need struct virtio_pci_vq_info, as most field in there
> are redundant:
>
> - the vq backpointer is not strictly neede to start with
> - the entry in the vqs list is not needed - the generic virtqueue already
> has list, we only need to check if it has a callback to get the same
> semantics
>