search for: platform_get_irq

Displaying 20 results from an estimated 62 matches for "platform_get_irq".

2019 Jul 02
2
[PATCH] virtio-mmio: add error check for platform_get_irq
...8ed163b 100644 --- a/drivers/virtio/virtio_mmio.c +++ b/drivers/virtio/virtio_mmio.c @@ -463,9 +463,14 @@ static int vm_find_vqs(struct virtio_device *vdev, unsigned nvqs, struct irq_affinity *desc) { struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); - unsigned int irq = platform_get_irq(vm_dev->pdev, 0); + int irq = platform_get_irq(vm_dev->pdev, 0); int i, err, queue_idx = 0; + if (irq < 0) { + dev_err(&vdev->dev, "no IRQ resource defined\n"); + return -ENODEV; + } + err = request_irq(irq, vm_interrupt, IRQF_SHARED, dev_name(&vdev->dev...
2019 Jul 02
2
[PATCH] virtio-mmio: add error check for platform_get_irq
...8ed163b 100644 --- a/drivers/virtio/virtio_mmio.c +++ b/drivers/virtio/virtio_mmio.c @@ -463,9 +463,14 @@ static int vm_find_vqs(struct virtio_device *vdev, unsigned nvqs, struct irq_affinity *desc) { struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); - unsigned int irq = platform_get_irq(vm_dev->pdev, 0); + int irq = platform_get_irq(vm_dev->pdev, 0); int i, err, queue_idx = 0; + if (irq < 0) { + dev_err(&vdev->dev, "no IRQ resource defined\n"); + return -ENODEV; + } + err = request_irq(irq, vm_interrupt, IRQF_SHARED, dev_name(&vdev->dev...
2019 Jul 02
2
[PATCH v2] virtio-mmio: add error check for platform_get_irq
...b5c5e06 100644 --- a/drivers/virtio/virtio_mmio.c +++ b/drivers/virtio/virtio_mmio.c @@ -463,9 +463,14 @@ static int vm_find_vqs(struct virtio_device *vdev, unsigned nvqs, struct irq_affinity *desc) { struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); - unsigned int irq = platform_get_irq(vm_dev->pdev, 0); + int irq = platform_get_irq(vm_dev->pdev, 0); int i, err, queue_idx = 0; + if (irq < 0) { + dev_err(&vdev->dev, "Cannot get IRQ resource\n"); + return irq; + } + err = request_irq(irq, vm_interrupt, IRQF_SHARED, dev_name(&vdev->dev), v...
2019 Jul 02
2
[PATCH v2] virtio-mmio: add error check for platform_get_irq
...b5c5e06 100644 --- a/drivers/virtio/virtio_mmio.c +++ b/drivers/virtio/virtio_mmio.c @@ -463,9 +463,14 @@ static int vm_find_vqs(struct virtio_device *vdev, unsigned nvqs, struct irq_affinity *desc) { struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); - unsigned int irq = platform_get_irq(vm_dev->pdev, 0); + int irq = platform_get_irq(vm_dev->pdev, 0); int i, err, queue_idx = 0; + if (irq < 0) { + dev_err(&vdev->dev, "Cannot get IRQ resource\n"); + return irq; + } + err = request_irq(irq, vm_interrupt, IRQF_SHARED, dev_name(&vdev->dev), v...
2014 Nov 06
2
[RFC PATCH] virtio-mmio: support for multiple irqs
...e IRQs? Guest uses vm_try_to_find_vqs to check whether it can get multiple IRQs like virtio-pci uses vp_try_to_find_vqs. And within function vm_request_multiple_irqs, guest check whether the number of IRQs host device gives is equal to the number we want. for (i = 0; i < nirqs; i++) { irq = platform_get_irq(vm_dev->pdev, i); if (irq == -ENXIO) goto error; } If we can't get the expected number of IRQs, return error and this try fails. Then guest will try two IRQS and single IRQ like virtio-pci. > Could you please document the new interface? > E.g. send a patch for virtio spec. Ok,...
2014 Nov 06
2
[RFC PATCH] virtio-mmio: support for multiple irqs
...e IRQs? Guest uses vm_try_to_find_vqs to check whether it can get multiple IRQs like virtio-pci uses vp_try_to_find_vqs. And within function vm_request_multiple_irqs, guest check whether the number of IRQs host device gives is equal to the number we want. for (i = 0; i < nirqs; i++) { irq = platform_get_irq(vm_dev->pdev, i); if (irq == -ENXIO) goto error; } If we can't get the expected number of IRQs, return error and this try fails. Then guest will try two IRQS and single IRQ like virtio-pci. > Could you please document the new interface? > E.g. send a patch for virtio spec. Ok,...
2019 Jul 02
0
[PATCH v2] virtio-mmio: add error check for platform_get_irq
...irtio/virtio_mmio.c > +++ b/drivers/virtio/virtio_mmio.c > @@ -463,9 +463,14 @@ static int vm_find_vqs(struct virtio_device *vdev, unsigned nvqs, > struct irq_affinity *desc) > { > struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); > - unsigned int irq = platform_get_irq(vm_dev->pdev, 0); > + int irq = platform_get_irq(vm_dev->pdev, 0); > int i, err, queue_idx = 0; > > + if (irq < 0) { > + dev_err(&vdev->dev, "Cannot get IRQ resource\n"); > + return irq; > + } > + > err = request_irq(irq, vm_interrupt, IR...
2019 Jul 02
0
[PATCH] virtio-mmio: add error check for platform_get_irq
...+++ b/drivers/virtio/virtio_mmio.c > @@ -463,9 +463,14 @@ static int vm_find_vqs(struct virtio_device *vdev, unsigned nvqs, > struct irq_affinity *desc) > { > struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); > - unsigned int irq = platform_get_irq(vm_dev->pdev, 0); > + int irq = platform_get_irq(vm_dev->pdev, 0); > int i, err, queue_idx = 0; > > + if (irq < 0) { > + dev_err(&vdev->dev, "no IRQ resource defined\n"); > + return -ENODEV; Don't ove...
2019 Jul 26
0
[PATCH AUTOSEL 5.2 36/85] virtio-mmio: add error check for platform_get_irq
...b5c5e06 100644 --- a/drivers/virtio/virtio_mmio.c +++ b/drivers/virtio/virtio_mmio.c @@ -463,9 +463,14 @@ static int vm_find_vqs(struct virtio_device *vdev, unsigned nvqs, struct irq_affinity *desc) { struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); - unsigned int irq = platform_get_irq(vm_dev->pdev, 0); + int irq = platform_get_irq(vm_dev->pdev, 0); int i, err, queue_idx = 0; + if (irq < 0) { + dev_err(&vdev->dev, "Cannot get IRQ resource\n"); + return irq; + } + err = request_irq(irq, vm_interrupt, IRQF_SHARED, dev_name(&vdev->dev), v...
2014 Nov 06
0
[RFC PATCH] virtio-mmio: support for multiple irqs
...gt; vm_request_multiple_irqs, guest check whether the number of IRQs host > device gives is equal to the number we want. OK but how does host specify the number of IRQs for a device? for pci this is done through the MSI-X capability register. > for (i = 0; i < nirqs; i++) { > irq = platform_get_irq(vm_dev->pdev, i); > if (irq == -ENXIO) > goto error; > } > > If we can't get the expected number of IRQs, return error and this try > fails. Then guest will try two IRQS and single IRQ like virtio-pci. > > > Could you please document the new interface? >...
2014 Nov 06
0
[RFC PATCH] virtio-mmio: support for multiple irqs
...info); > } > > -static void vm_del_vqs(struct virtio_device *vdev) > +static void vm_free_irqs(struct virtio_device *vdev) > { > + int i; > struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); > + > + if (vm_dev->single_irq_enabled) { > + free_irq(platform_get_irq(vm_dev->pdev, 0), vm_dev); > + vm_dev->single_irq_enabled = 0; > + } > + > + for (i = 0; i < vm_dev->used_irqs; ++i) > + free_irq(platform_get_irq(vm_dev->pdev, i), vm_dev); > + > + vm_dev->num_irqs = 0; > + vm_dev->used_irqs = 0; > + kfree(vm_dev-&...
2014 Nov 04
6
[RFC PATCH] virtio-mmio: support for multiple irqs
...atic void vm_del_vq(struct virtqueue *vq) kfree(info); } -static void vm_del_vqs(struct virtio_device *vdev) +static void vm_free_irqs(struct virtio_device *vdev) { + int i; struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); + + if (vm_dev->single_irq_enabled) { + free_irq(platform_get_irq(vm_dev->pdev, 0), vm_dev); + vm_dev->single_irq_enabled = 0; + } + + for (i = 0; i < vm_dev->used_irqs; ++i) + free_irq(platform_get_irq(vm_dev->pdev, i), vm_dev); + + vm_dev->num_irqs = 0; + vm_dev->used_irqs = 0; + kfree(vm_dev->vm_vq_names); + vm_dev->vm_vq_names = N...
2014 Nov 04
6
[RFC PATCH] virtio-mmio: support for multiple irqs
...atic void vm_del_vq(struct virtqueue *vq) kfree(info); } -static void vm_del_vqs(struct virtio_device *vdev) +static void vm_free_irqs(struct virtio_device *vdev) { + int i; struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); + + if (vm_dev->single_irq_enabled) { + free_irq(platform_get_irq(vm_dev->pdev, 0), vm_dev); + vm_dev->single_irq_enabled = 0; + } + + for (i = 0; i < vm_dev->used_irqs; ++i) + free_irq(platform_get_irq(vm_dev->pdev, i), vm_dev); + + vm_dev->num_irqs = 0; + vm_dev->used_irqs = 0; + kfree(vm_dev->vm_vq_names); + vm_dev->vm_vq_names = N...
2020 Apr 09
0
[PATCH] virtio-mmio: Delete an error message in vm_find_vqs()
On 2020/4/6 ??1:19, Markus Elfring wrote: > From: Markus Elfring <elfring at users.sourceforge.net> > Date: Sun, 5 Apr 2020 19:14:10 +0200 > > The function ?platform_get_irq? can log an error already. > Thus omit a redundant message for the exception handling in the > calling function. It looks to me that not all error path of platform_get_irq() were loggd. And git grep told me there're other users of platform_get_irq() that check and log by themselves....
2020 Apr 09
0
virtio-mmio: Delete an error message in vm_find_vqs()
On 2020/4/9 ??2:02, Markus Elfring wrote: >>> The function ?platform_get_irq? can log an error already. >>> Thus omit a redundant message for the exception handling in the >>> calling function. >> It looks to me that not all error path of platform_get_irq() were loggd. > How do you think about to clarify the handling of the error code ?-EPROBE_DEF...
2023 Oct 10
1
[PATCH 2/2] virtio-mmio: Support multiple interrupts per device
...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_device *vdev) > @@ -488,6 +511,18 @@ static struct virtqueue *vm_setup_vq(struct virtio_device *vdev, unsigned int in > return ERR_PTR(err); > } > > +/* Map virtqueue to zero-based...
2023 Oct 10
1
[PATCH 2/2] virtio-mmio: Support multiple interrupts per device
...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_device *vdev) > @@ -488,6 +511,18 @@ static struct virtqueue *vm_setup_vq(struct virtio_device *vdev, unsigned int in > return ERR_PTR(err); > } > > +/* Map virtqueue to zero-based...
2019 Sep 25
0
[PATCH] virtio_mmio: remove redundant dev_err message
On 2019/9/24 ??3:21, Ding Xiang wrote: > platform_get_irq already contains error message, Is this message contained in all possible error path? If not, it's probably better to keep it as is. Thanks > so remove > the redundant dev_err message > > Signed-off-by: Ding Xiang <dingxiang at cmss.chinamobile.com> > --- > drive...
2019 Jul 16
1
[PULL] virtio, vhost: fixes, features, performance
...79fcf2: vhost: scsi: add weight support (2019-05-27 11:08:23 -0400) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus for you to fetch changes up to 5e663f0410fa2f355042209154029842ba1abd43: virtio-mmio: add error check for platform_get_irq (2019-07-11 16:22:29 -0400) ---------------------------------------------------------------- virtio, vhost: fixes, features, performance new iommu device vhost guest memory access using vmap (just meta-data for now) minor fixes Signed-off-by: Michael S. Tsirkin <mst at redhat.com> Note: d...
2016 Aug 30
1
[PATCH v8 05/18] dmaengine: st_fdma: Add STMicroelectronics FDMA engine driver support
...fdev->nr_channels > + * sizeof(struct st_fdma_chan), GFP_KERNEL); devm_kcalloc() > + if (!fdev->chans) > + return -ENOMEM; > + > + fdev->dev = &pdev->dev; > + fdev->drvdata = drvdata; > + platform_set_drvdata(pdev, fdev); > + > + fdev->irq = platform_get_irq(pdev, 0); > + if (fdev->irq < 0) { > + dev_err(&pdev->dev, "Failed to get irq resource\n"); > + return -EINVAL; > + } > + > + ret = devm_request_irq(&pdev->dev, fdev->irq, st_fdma_irq_handler, 0, > + dev_name(&pdev->dev), fdev)...