search for: devm_free_irq

Displaying 20 results from an estimated 39 matches for "devm_free_irq".

2023 Jun 30
2
[PATCH] vp_vdpa: synchronize irq when free irq
...p_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_MSI_NO_VECTOR) { vp_modern_config_vector(mde...
2023 Jun 30
1
[PATCH] vp_vdpa: synchronize irq when free irq
...@@ 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_MSI_NO_VECTOR) { >...
2023 Jun 30
1
[PATCH] vp_vdpa: synchronize irq when free irq
...ern_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, > &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_v...
2020 Jul 15
2
[PATCH 6/7] ifcvf: replace irq_request/free with helpers in vDPA core.
...t; ? { >>> ????? struct pci_dev *pdev = adapter->pdev; >>> ????? struct ifcvf_hw *vf = &adapter->vf; >>> +??? struct vdpa_device *vdpa = &adapter->vdpa; >>> ????? int i; >>> ? ? ????? for (i = 0; i < queues; i++) >>> -??????? devm_free_irq(&pdev->dev, vf->vring[i].irq, &vf->vring[i]); >>> +??????? vdpa_free_vq_irq(&pdev->dev, vdpa, vf->vring[i].irq, i, >>> &vf->vring[i]); >>> ? ????? ifcvf_free_irq_vectors(pdev); >>> ? } >>> @@ -60,6 +61,7 @@ static int i...
2020 Jul 15
2
[PATCH 6/7] ifcvf: replace irq_request/free with helpers in vDPA core.
...t; ? { >>> ????? struct pci_dev *pdev = adapter->pdev; >>> ????? struct ifcvf_hw *vf = &adapter->vf; >>> +??? struct vdpa_device *vdpa = &adapter->vdpa; >>> ????? int i; >>> ? ? ????? for (i = 0; i < queues; i++) >>> -??????? devm_free_irq(&pdev->dev, vf->vring[i].irq, &vf->vring[i]); >>> +??????? vdpa_free_vq_irq(&pdev->dev, vdpa, vf->vring[i].irq, i, >>> &vf->vring[i]); >>> ? ????? ifcvf_free_irq_vectors(pdev); >>> ? } >>> @@ -60,6 +61,7 @@ static int i...
2020 May 12
0
[PATCH] ifcvf: move IRQ request/free to status change handlers
...ifcvf_adapter *adapter, int queues) >>> +{ >>> +??? struct pci_dev *pdev = adapter->pdev; >>> +??? struct ifcvf_hw *vf = &adapter->vf; >>> +??? int i; >>> + >>> + >>> +??? for (i = 0; i < queues; i++) >>> +??????? devm_free_irq(&pdev->dev, vf->vring[i].irq, &vf->vring[i]); >>> + >>> +??? ifcvf_free_irq_vectors(pdev); >>> +} >>> + >>> +static int ifcvf_request_irq(struct ifcvf_adapter *adapter) >>> +{ >>> +??? struct pci_dev *pdev = adapter-&gt...
2020 May 12
1
[PATCH] ifcvf: move IRQ request/free to status change handlers
...ifcvf_adapter *adapter, int queues) >>> +{ >>> +??? struct pci_dev *pdev = adapter->pdev; >>> +??? struct ifcvf_hw *vf = &adapter->vf; >>> +??? int i; >>> + >>> + >>> +??? for (i = 0; i < queues; i++) >>> +??????? devm_free_irq(&pdev->dev, vf->vring[i].irq, &vf->vring[i]); >>> + >>> +??? ifcvf_free_irq_vectors(pdev); >>> +} >>> + >>> +static int ifcvf_request_irq(struct ifcvf_adapter *adapter) >>> +{ >>> +??? struct pci_dev *pdev = adapter-&gt...
2016 Aug 30
1
[PATCH v8 05/18] dmaengine: st_fdma: Add STMicroelectronics FDMA engine driver support
...; > + fchan->vchan.desc_free = st_fdma_free_desc; > + vchan_init(&fchan->vchan, &fdev->dma_device); this initialized a tasklet > +static int st_fdma_remove(struct platform_device *pdev) > +{ > + struct st_fdma_dev *fdev = platform_get_drvdata(pdev); > + > + devm_free_irq(&pdev->dev, fdev->irq, fdev); > + st_slim_rproc_put(fdev->slim_rproc); > + of_dma_controller_free(pdev->dev.of_node); > + dma_async_device_unregister(&fdev->dma_device); and that vchan tasklet is not quisced here :( > +MODULE_LICENSE("GPL v2"); > +M...
2016 Aug 30
1
[PATCH v8 05/18] dmaengine: st_fdma: Add STMicroelectronics FDMA engine driver support
...; > + fchan->vchan.desc_free = st_fdma_free_desc; > + vchan_init(&fchan->vchan, &fdev->dma_device); this initialized a tasklet > +static int st_fdma_remove(struct platform_device *pdev) > +{ > + struct st_fdma_dev *fdev = platform_get_drvdata(pdev); > + > + devm_free_irq(&pdev->dev, fdev->irq, fdev); > + st_slim_rproc_put(fdev->slim_rproc); > + of_dma_controller_free(pdev->dev.of_node); > + dma_async_device_unregister(&fdev->dma_device); and that vchan tasklet is not quisced here :( > +MODULE_LICENSE("GPL v2"); > +M...
2020 May 11
0
[PATCH] ifcvf: move IRQ request/free to status change handlers
...pci_free_irq_vectors(data); > +} > + > +static void ifcvf_free_irq(struct ifcvf_adapter *adapter, int queues) > +{ > + struct pci_dev *pdev = adapter->pdev; > + struct ifcvf_hw *vf = &adapter->vf; > + int i; > + > + > + for (i = 0; i < queues; i++) > + devm_free_irq(&pdev->dev, vf->vring[i].irq, &vf->vring[i]); > + > + ifcvf_free_irq_vectors(pdev); > +} > + > +static int ifcvf_request_irq(struct ifcvf_adapter *adapter) > +{ > + struct pci_dev *pdev = adapter->pdev; > + struct ifcvf_hw *vf = &adapter->vf; >...
2008 Jan 18
2
[PATCH 2/3] Make IRQ handlers typesafe.
...pe((handler), irq_handler_t, \ + int (*)(int, typeof(dev_id))), \ + (flags), (name), (dev_id)) +extern int __must_check __devm_request_irq(struct device *dev, unsigned int irq, irq_handler_t handler, unsigned long irqflags, const char *devname, void *dev_id); extern void devm_free_irq(struct device *dev, unsigned int irq, void *dev_id); diff -r 0fe1a980708b include/linux/kernel.h --- a/include/linux/kernel.h Thu Jan 17 14:48:56 2008 +1100 +++ b/include/linux/kernel.h Thu Jan 17 15:42:01 2008 +1100 @@ -379,6 +379,13 @@ static inline int __attribute__ ((format (void)__tmp; \ })...
2008 Jan 18
2
[PATCH 2/3] Make IRQ handlers typesafe.
...pe((handler), irq_handler_t, \ + int (*)(int, typeof(dev_id))), \ + (flags), (name), (dev_id)) +extern int __must_check __devm_request_irq(struct device *dev, unsigned int irq, irq_handler_t handler, unsigned long irqflags, const char *devname, void *dev_id); extern void devm_free_irq(struct device *dev, unsigned int irq, void *dev_id); diff -r 0fe1a980708b include/linux/kernel.h --- a/include/linux/kernel.h Thu Jan 17 14:48:56 2008 +1100 +++ b/include/linux/kernel.h Thu Jan 17 15:42:01 2008 +1100 @@ -379,6 +379,13 @@ static inline int __attribute__ ((format (void)__tmp; \ })...
2020 Jul 23
4
[PATCH 1/2] vdpa: ifcvf: return err when fail to request config irq
We ignore the err of requesting config interrupt, fix this. Fixes: e7991f376a4d ("ifcvf: implement config interrupt in IFCVF") Cc: Zhu Lingshan <lingshan.zhu at intel.com> Signed-off-by: Jason Wang <jasowang at redhat.com> --- drivers/vdpa/ifcvf/ifcvf_main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/vdpa/ifcvf/ifcvf_main.c
2020 Jul 23
4
[PATCH 1/2] vdpa: ifcvf: return err when fail to request config irq
We ignore the err of requesting config interrupt, fix this. Fixes: e7991f376a4d ("ifcvf: implement config interrupt in IFCVF") Cc: Zhu Lingshan <lingshan.zhu at intel.com> Signed-off-by: Jason Wang <jasowang at redhat.com> --- drivers/vdpa/ifcvf/ifcvf_main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/vdpa/ifcvf/ifcvf_main.c
2023 Oct 10
1
[PATCH 2/2] virtio-mmio: Support multiple interrupts per device
...ce *vdev) > { > struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); > struct virtqueue *vq, *n; > + int i, irq; > + > + for (i = 0; i < vm_dev->num_irqs; i++) { > + irq = vm_dev->irq_base + i; > + devm_free_irq(&vdev->dev, irq, vm_dev); > + } > > list_for_each_entry_safe(vq, n, &vdev->vqs, list) > vm_del_vq(vq); > - > - free_irq(platform_get_irq(vm_dev->pdev, 0), vm_dev); > } > > static void vm_synchronize_cbs(struct virtio_...
2023 Oct 10
1
[PATCH 2/2] virtio-mmio: Support multiple interrupts per device
...ce *vdev) > { > struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); > struct virtqueue *vq, *n; > + int i, irq; > + > + for (i = 0; i < vm_dev->num_irqs; i++) { > + irq = vm_dev->irq_base + i; > + devm_free_irq(&vdev->dev, irq, vm_dev); > + } > > list_for_each_entry_safe(vq, n, &vdev->vqs, list) > vm_del_vq(vq); > - > - free_irq(platform_get_irq(vm_dev->pdev, 0), vm_dev); > } > > static void vm_synchronize_cbs(struct virtio_...
2020 Jul 13
0
[PATCH 6/7] ifcvf: replace irq_request/free with helpers in vDPA core.
...vf_free_irq(struct ifcvf_adapter *adapter, int queues) > { > struct pci_dev *pdev = adapter->pdev; > struct ifcvf_hw *vf = &adapter->vf; > + struct vdpa_device *vdpa = &adapter->vdpa; > int i; > > > for (i = 0; i < queues; i++) > - devm_free_irq(&pdev->dev, vf->vring[i].irq, &vf->vring[i]); > + vdpa_free_vq_irq(&pdev->dev, vdpa, vf->vring[i].irq, i, &vf->vring[i]); > > ifcvf_free_irq_vectors(pdev); > } > @@ -60,6 +61,7 @@ static int ifcvf_request_irq(struct ifcvf_adapter *adapter) &...
2020 Jul 15
0
[PATCH 6/7] ifcvf: replace irq_request/free with helpers in vDPA core.
...i_dev *pdev = adapter->pdev; > > > > ????? struct ifcvf_hw *vf = &adapter->vf; > > > > +??? struct vdpa_device *vdpa = &adapter->vdpa; > > > > ????? int i; > > > > ? ? ????? for (i = 0; i < queues; i++) > > > > -??????? devm_free_irq(&pdev->dev, vf->vring[i].irq, &vf->vring[i]); > > > > +??????? vdpa_free_vq_irq(&pdev->dev, vdpa, vf->vring[i].irq, i, > > > > &vf->vring[i]); > > > > ? ????? ifcvf_free_irq_vectors(pdev); > > > > ? } > > > &...
2020 Jul 17
0
[PATCH V2 5/6] ifcvf: replace irq_request/free with vDPA helpers
...vf_free_irq(struct ifcvf_adapter *adapter, int queues) > { > struct pci_dev *pdev = adapter->pdev; > struct ifcvf_hw *vf = &adapter->vf; > + struct vdpa_device *vdpa = &adapter->vdpa; > int i; > > > for (i = 0; i < queues; i++) > - devm_free_irq(&pdev->dev, vf->vring[i].irq, &vf->vring[i]); > + vdpa_free_vq_irq(&pdev->dev, vdpa, vf->vring[i].irq, i, &vf->vring[i]); > > ifcvf_free_irq_vectors(pdev); > } > @@ -60,6 +61,7 @@ static int ifcvf_request_irq(struct ifcvf_adapter *adapter) &...
2020 Jul 17
0
[PATCH V2 3/6] vDPA: implement IRQ offloading helpers in vDPA core
...for vq %d\n", qid); > + else > + vdpa_setup_irq(vdev, qid, irq); > + > + return ret; > + > +} > +EXPORT_SYMBOL_GPL(vdpa_alloc_vq_irq); > + > +void vdpa_free_vq_irq(struct device *dev, struct vdpa_device *vdev, int irq, > + int qid, void *dev_id) > +{ > + devm_free_irq(dev, irq, dev_id); > + vdpa_unsetup_irq(vdev, qid); > +} > +EXPORT_SYMBOL_GPL(vdpa_free_vq_irq); > + > static int vdpa_init(void) > { > return bus_register(&vdpa_bus); > diff --git a/include/linux/vdpa.h b/include/linux/vdpa.h > index 239db79..7d64d83 100644 &g...