search for: synchronize_irq

Displaying 20 results from an estimated 35 matches for "synchronize_irq".

2023 Jun 30
2
[PATCH] vp_vdpa: synchronize irq when free irq
...o_pci/vp_vdpa.c +++ b/drivers/vdpa/virtio_pci/vp_vdpa.c @@ -116,6 +116,7 @@ static void vp_vdpa_free_irq(struct vp_vdpa *vp_vdpa) for (i = 0; i < vp_vdpa->queues; i++) { if (vp_vdpa->vring[i].irq != VIRTIO_MSI_NO_VECTOR) { vp_modern_queue_vector(mdev, i, VIRTIO_MSI_NO_VECTOR); + synchronize_irq(vp_vdpa->vring[i].irq); devm_free_irq(&pdev->dev, vp_vdpa->vring[i].irq, &vp_vdpa->vring[i]); vp_vdpa->vring[i].irq = VIRTIO_MSI_NO_VECTOR; @@ -124,6 +125,7 @@ static void vp_vdpa_free_irq(struct vp_vdpa *vp_vdpa) if (vp_vdpa->config_irq != VIRTIO_MS...
2023 Jun 30
1
[PATCH] vp_vdpa: synchronize irq when free irq
...tic void vp_vdpa_free_irq(struct vp_vdpa *vp_vdpa) > for (i = 0; i < vp_vdpa->queues; i++) { > if (vp_vdpa->vring[i].irq != VIRTIO_MSI_NO_VECTOR) { > vp_modern_queue_vector(mdev, i, VIRTIO_MSI_NO_VECTOR); > + synchronize_irq(vp_vdpa->vring[i].irq); Interestingly, we don't do this in virtio_pci_common.c and we only synchronize during reset there. Any reason makes vp_vdpa different? Thanks > devm_free_irq(&pdev->dev, vp_vdpa->vring[i].irq, >...
2023 Jun 30
1
[PATCH] vp_vdpa: synchronize irq when free irq
...vers/vdpa/virtio_pci/vp_vdpa.c > @@ -116,6 +116,7 @@ static void vp_vdpa_free_irq(struct vp_vdpa *vp_vdpa) > for (i = 0; i < vp_vdpa->queues; i++) { > if (vp_vdpa->vring[i].irq != VIRTIO_MSI_NO_VECTOR) { > vp_modern_queue_vector(mdev, i, VIRTIO_MSI_NO_VECTOR); > + synchronize_irq(vp_vdpa->vring[i].irq); > devm_free_irq(&pdev->dev, vp_vdpa->vring[i].irq, > &vp_vdpa->vring[i]); > vp_vdpa->vring[i].irq = VIRTIO_MSI_NO_VECTOR; > @@ -124,6 +125,7 @@ static void vp_vdpa_free_irq(struct vp_vdpa *vp_vdpa) > > if (vp_vd...
2011 Nov 17
1
[PATCH] virtio-pci: make reset operation safer
...rtio_device *vdev, u8 status) iowrite8(status, vp_dev->ioaddr + VIRTIO_PCI_STATUS); } +/* wait for pending irq handlers */ +static 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(vp_dev->msix_entries[i].vector); +} + static void vp_reset(struct virtio_device *vdev) { struct virtio_pci_device *vp_dev = to_vp_device(vdev); /* 0 status means a reset. */ iowrite8(0, v...
2011 Nov 17
1
[PATCH] virtio-pci: make reset operation safer
...rtio_device *vdev, u8 status) iowrite8(status, vp_dev->ioaddr + VIRTIO_PCI_STATUS); } +/* wait for pending irq handlers */ +static 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(vp_dev->msix_entries[i].vector); +} + static void vp_reset(struct virtio_device *vdev) { struct virtio_pci_device *vp_dev = to_vp_device(vdev); /* 0 status means a reset. */ iowrite8(0, v...
2017 Jan 27
0
[PATCH 2/9] virtio_pci: use shared interrupts for virtqueues
..._common.c index a3376731..5880e86 100644 --- a/drivers/virtio/virtio_pci_common.c +++ b/drivers/virtio/virtio_pci_common.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_in...
2017 Feb 05
0
[PATCH 2/9] virtio_pci: use shared interrupts for virtqueues
...index a33767318cbf..274dc1ff09c0 100644 --- a/drivers/virtio/virtio_pci_common.c +++ b/drivers/virtio/virtio_pci_common.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_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.
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.
2023 May 08
1
[PATCH V2 4/5] vDPA/ifcvf: synchronize irqs in the reset routine
...id ifcvf_reset_config_handler(struct ifcvf_hw *hw) +{ + hw->config_cb.callback = NULL; + hw->config_cb.private = NULL; ifcvf_set_config_vector(hw, VIRTIO_MSI_NO_VECTOR); - for (i = 0; i < hw->nr_vring; i++) { - ifcvf_set_vq_vector(hw, i, VIRTIO_MSI_NO_VECTOR); +} + +static void ifcvf_synchronize_irq(struct ifcvf_hw *hw) +{ + u32 nvectors = hw->num_msix_vectors; + struct pci_dev *pdev = hw->pdev; + int i, irq; + + for (i = 0; i < nvectors; i++) { + irq = pci_irq_vector(pdev, i); + if (irq >= 0) + synchronize_irq(irq); } } void ifcvf_stop_hw(struct ifcvf_hw *hw) { - ifcvf_...
2023 May 24
2
[PATCH V2 4/5] vDPA/ifcvf: synchronize irqs in the reset routine
...fig_cb.callback = NULL; > + hw->config_cb.private = NULL; > ifcvf_set_config_vector(hw, VIRTIO_MSI_NO_VECTOR); > - for (i = 0; i < hw->nr_vring; i++) { > - ifcvf_set_vq_vector(hw, i, VIRTIO_MSI_NO_VECTOR); > +} > + > +static void ifcvf_synchronize_irq(struct ifcvf_hw *hw) > +{ > + u32 nvectors = hw->num_msix_vectors; > + struct pci_dev *pdev = hw->pdev; > + int i, irq; > + > + for (i = 0; i < nvectors; i++) { > + irq = pci_irq_vector(pdev, i); > + if (irq >=...
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
2023 Mar 31
7
[PATCH 0/5] vDPA/ifcvf: implement immediate initialization mechanism
Formerly, ifcvf driver has implemented a lazy-initialization mechanism for the virtqueues and other config space contents, it would store all configurations that passed down from the userspace, then load them to the device config space upon DRIVER_OK. This can not serve live migration, so this series implement an immediate initialization mechanism, which means rather than the former store-load
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
2014 Jun 27
0
DAHDI-Linux and DAHDI-Tools 2.9.2-rc1 Now Available
...in waitfor_xpds() xpp: stability -- better xbus shut down xpp: demote some NOTICE() to DBG() xpp: re-organize calls so worker_reset() Shaun Ruffell (54): wcte13xp: Trivial. Remove duplicate pointer to "struct pci_dev". wcte13xp: Remove redundant call to synchronize_irq(). wcte43xp: Close potential unbalanced call to enable_irq(). dahdi: Define pf_fmt() globally in kernel.h wctc4xxp: Trivial. Remove unused timer_list from struct tcb. wcte43x: Trivial fix of 'source' in comment. wcte43x: Build against 2.6.18 and CentOS 5.5...
2014 Jun 27
0
DAHDI-Linux and DAHDI-Tools 2.9.2-rc1 Now Available
...in waitfor_xpds() xpp: stability -- better xbus shut down xpp: demote some NOTICE() to DBG() xpp: re-organize calls so worker_reset() Shaun Ruffell (54): wcte13xp: Trivial. Remove duplicate pointer to "struct pci_dev". wcte13xp: Remove redundant call to synchronize_irq(). wcte43xp: Close potential unbalanced call to enable_irq(). dahdi: Define pf_fmt() globally in kernel.h wctc4xxp: Trivial. Remove unused timer_list from struct tcb. wcte43x: Trivial fix of 'source' in comment. wcte43x: Build against 2.6.18 and CentOS 5.5...
2014 Jul 21
0
DAHDI-Linux and DAHDI-Tools 2.9.2 Now Available
...in waitfor_xpds() xpp: stability -- better xbus shut down xpp: demote some NOTICE() to DBG() xpp: re-organize calls so worker_reset() Shaun Ruffell (58): wcte13xp: Trivial. Remove duplicate pointer to "struct pci_dev". wcte13xp: Remove redundant call to synchronize_irq(). wcte43xp: Close potential unbalanced call to enable_irq(). dahdi: Define pf_fmt() globally in kernel.h wctc4xxp: Trivial. Remove unused timer_list from struct tcb. wcte43x: Trivial fix of 'source' in comment. wcte43x: Build against 2.6.18 and CentOS 5.5...
2014 Jul 21
0
DAHDI-Linux and DAHDI-Tools 2.9.2 Now Available
...in waitfor_xpds() xpp: stability -- better xbus shut down xpp: demote some NOTICE() to DBG() xpp: re-organize calls so worker_reset() Shaun Ruffell (58): wcte13xp: Trivial. Remove duplicate pointer to "struct pci_dev". wcte13xp: Remove redundant call to synchronize_irq(). wcte43xp: Close potential unbalanced call to enable_irq(). dahdi: Define pf_fmt() globally in kernel.h wctc4xxp: Trivial. Remove unused timer_list from struct tcb. wcte43x: Trivial fix of 'source' in comment. wcte43x: Build against 2.6.18 and CentOS 5.5...