Displaying 20 results from an estimated 287 matches for "free_irq".
2017 Mar 08
3
[PATCH] virtio-pci: Remove affinity hint before freeing the interrupt
virtio-pci registers a per-vq affinity hint when using MSIX,
but fails to remove it when freeing the interrupt, resulting
in this type of splat:
[ 31.111202] WARNING: CPU: 0 PID: 2823 at kernel/irq/manage.c:1503 __free_irq+0x2c4/0x2c8
[ 31.114689] Modules linked in:
[ 31.116101] CPU: 0 PID: 2823 Comm: kexec Not tainted 4.10.0+ #6941
[ 31.118911] Hardware name: Generic DT based system
[ 31.121319] [<c022fb78>] (unwind_backtrace) from [<c0229d8c>] (show_stack+0x18/0x1c)
[ 31.125017] [<c0229d8c&...
2017 Mar 08
3
[PATCH] virtio-pci: Remove affinity hint before freeing the interrupt
virtio-pci registers a per-vq affinity hint when using MSIX,
but fails to remove it when freeing the interrupt, resulting
in this type of splat:
[ 31.111202] WARNING: CPU: 0 PID: 2823 at kernel/irq/manage.c:1503 __free_irq+0x2c4/0x2c8
[ 31.114689] Modules linked in:
[ 31.116101] CPU: 0 PID: 2823 Comm: kexec Not tainted 4.10.0+ #6941
[ 31.118911] Hardware name: Generic DT based system
[ 31.121319] [<c022fb78>] (unwind_backtrace) from [<c0229d8c>] (show_stack+0x18/0x1c)
[ 31.125017] [<c0229d8c&...
2017 Dec 12
1
[PATCH 2/3] virtio: use put_device instead of kfree
...truct _vop_vdev, vdev);
> +
> + kfree(vop_vdev);
> }
>
> /*
> @@ -501,7 +503,9 @@ static int _vop_add_device(struct mic_device_desc __iomem *d,
> dev_err(_vop_dev(vdev),
> "Failed to register vop device %u type %u\n",
> offset, type);
> - goto free_irq;
> + vpdev->hw_ops->free_irq(vpdev, vdev->virtio_cookie, vdev);
> + put_device(&vdev->vdev.dev);
> + return ret;
> }
> writeq((u64)vdev, &vdev->dc->vdev);
> dev_dbg(_vop_dev(vdev), "%s: registered vop device %u type %u vdev %p\n",
>...
2017 Dec 12
1
[PATCH 2/3] virtio: use put_device instead of kfree
...truct _vop_vdev, vdev);
> +
> + kfree(vop_vdev);
> }
>
> /*
> @@ -501,7 +503,9 @@ static int _vop_add_device(struct mic_device_desc __iomem *d,
> dev_err(_vop_dev(vdev),
> "Failed to register vop device %u type %u\n",
> offset, type);
> - goto free_irq;
> + vpdev->hw_ops->free_irq(vpdev, vdev->virtio_cookie, vdev);
> + put_device(&vdev->vdev.dev);
> + return ret;
> }
> writeq((u64)vdev, &vdev->dc->vdev);
> dev_dbg(_vop_dev(vdev), "%s: registered vop device %u type %u vdev %p\n",
>...
2009 Jul 21
1
[PATCH 2/2] virtio: fix double free_irq
.../virtio/virtio_pci.c
+++ b/drivers/virtio/virtio_pci.c
@@ -466,8 +466,10 @@ static void vp_del_vq(struct virtqueue *vq)
iowrite16(info->queue_index, vp_dev->ioaddr + VIRTIO_PCI_QUEUE_SEL);
- if (info->vector != VIRTIO_MSI_NO_VECTOR)
+ if (info->vector != VIRTIO_MSI_NO_VECTOR) {
free_irq(vp_dev->msix_entries[info->vector].vector, vq);
+ --vp_dev->msix_used_vectors;
+ }
if (vp_dev->msix_enabled) {
iowrite16(VIRTIO_MSI_NO_VECTOR,
--
1.6.2.5
2009 Jul 21
1
[PATCH 2/2] virtio: fix double free_irq
.../virtio/virtio_pci.c
+++ b/drivers/virtio/virtio_pci.c
@@ -466,8 +466,10 @@ static void vp_del_vq(struct virtqueue *vq)
iowrite16(info->queue_index, vp_dev->ioaddr + VIRTIO_PCI_QUEUE_SEL);
- if (info->vector != VIRTIO_MSI_NO_VECTOR)
+ if (info->vector != VIRTIO_MSI_NO_VECTOR) {
free_irq(vp_dev->msix_entries[info->vector].vector, vq);
+ --vp_dev->msix_used_vectors;
+ }
if (vp_dev->msix_enabled) {
iowrite16(VIRTIO_MSI_NO_VECTOR,
--
1.6.2.5
2017 Dec 11
6
[PATCH 0/3] fix cleanup for fail to register_virtio_device
This series fix the cleanup for the caller of register_virtio_device,
the main work is use put_device instead of kfree.
weiping zhang (3):
virtio_pci: use put_device instead of kfree
virtio: use put_device instead of kfree
virtio: put reference count of virtio_device.dev
drivers/misc/mic/vop/vop_main.c | 16 +++++++++-------
drivers/remoteproc/remoteproc_virtio.c | 2 +-
2017 Dec 11
6
[PATCH 0/3] fix cleanup for fail to register_virtio_device
This series fix the cleanup for the caller of register_virtio_device,
the main work is use put_device instead of kfree.
weiping zhang (3):
virtio_pci: use put_device instead of kfree
virtio: use put_device instead of kfree
virtio: put reference count of virtio_device.dev
drivers/misc/mic/vop/vop_main.c | 16 +++++++++-------
drivers/remoteproc/remoteproc_virtio.c | 2 +-
2009 Jul 23
1
[PATCHv2 1/2] virtio: fix double free_irq on device removal
...d) {
iowrite16(vector, vp_dev->ioaddr + VIRTIO_MSI_QUEUE_VECTOR);
@@ -444,10 +442,8 @@ static struct virtqueue *vp_find_vq(struct virtio_device *vdev, unsigned index,
return vq;
out_assign:
- if (info->vector != VIRTIO_MSI_NO_VECTOR) {
+ if (info->vector != VIRTIO_MSI_NO_VECTOR)
free_irq(vp_dev->msix_entries[info->vector].vector, vq);
- --vp_dev->msix_used_vectors;
- }
out_request_irq:
vring_del_virtqueue(vq);
out_activate_queue:
@@ -503,8 +499,10 @@ static int vp_find_vqs(struct virtio_device *vdev, unsigned nvqs,
vq_callback_t *callbacks[],
const...
2009 Jul 23
1
[PATCHv2 1/2] virtio: fix double free_irq on device removal
...d) {
iowrite16(vector, vp_dev->ioaddr + VIRTIO_MSI_QUEUE_VECTOR);
@@ -444,10 +442,8 @@ static struct virtqueue *vp_find_vq(struct virtio_device *vdev, unsigned index,
return vq;
out_assign:
- if (info->vector != VIRTIO_MSI_NO_VECTOR) {
+ if (info->vector != VIRTIO_MSI_NO_VECTOR)
free_irq(vp_dev->msix_entries[info->vector].vector, vq);
- --vp_dev->msix_used_vectors;
- }
out_request_irq:
vring_del_virtqueue(vq);
out_activate_queue:
@@ -503,8 +499,10 @@ static int vp_find_vqs(struct virtio_device *vdev, unsigned nvqs,
vq_callback_t *callbacks[],
const...
2023 Jul 27
1
[PATCH] vdpa/mlx5: Fix crash on shutdown for when no ndev exists
...+ b/drivers/vdpa/mlx5/net/mlx5_vnet.c
> > > @@ -3556,7 +3556,8 @@ static void mlx5v_shutdown(struct auxiliary_device
> > > *auxdev)
> > > ????????mgtdev = auxiliary_get_drvdata(auxdev);
> > > ????????ndev = mgtdev->ndev;
> > > ?
> > > -???????free_irqs(ndev);
> > > +???????if (ndev)
> > > +???????????????free_irqs(ndev);
> > > ?}
> > > ?
> >
> > something I don't get:
> > irqs are allocated in mlx5_vdpa_dev_add
> > why are they not freed in mlx5_vdpa_dev_del?
> >
> That i...
2017 Mar 08
0
[PATCH] virtio-pci: Remove affinity hint before freeing the interrupt
...ed, Mar 08, 2017 at 08:09:27AM +0000, Marc Zyngier wrote:
> virtio-pci registers a per-vq affinity hint when using MSIX,
> but fails to remove it when freeing the interrupt, resulting
> in this type of splat:
>
> [ 31.111202] WARNING: CPU: 0 PID: 2823 at kernel/irq/manage.c:1503 __free_irq+0x2c4/0x2c8
> [ 31.114689] Modules linked in:
> [ 31.116101] CPU: 0 PID: 2823 Comm: kexec Not tainted 4.10.0+ #6941
> [ 31.118911] Hardware name: Generic DT based system
> [ 31.121319] [<c022fb78>] (unwind_backtrace) from [<c0229d8c>] (show_stack+0x18/0x1c)
> [...
2017 Dec 11
0
[PATCH 2/3] virtio: use put_device instead of kfree
...uct _vop_vdev *vop_vdev =
+ container_of(vdev, struct _vop_vdev, vdev);
+
+ kfree(vop_vdev);
}
/*
@@ -501,7 +503,9 @@ static int _vop_add_device(struct mic_device_desc __iomem *d,
dev_err(_vop_dev(vdev),
"Failed to register vop device %u type %u\n",
offset, type);
- goto free_irq;
+ vpdev->hw_ops->free_irq(vpdev, vdev->virtio_cookie, vdev);
+ put_device(&vdev->vdev.dev);
+ return ret;
}
writeq((u64)vdev, &vdev->dc->vdev);
dev_dbg(_vop_dev(vdev), "%s: registered vop device %u type %u vdev %p\n",
@@ -509,8 +513,6 @@ static int _vop...
2017 Dec 12
0
[PATCH v2 2/3] virtio: use put_device instead of kfree
...uct _vop_vdev *vop_vdev =
+ container_of(vdev, struct _vop_vdev, vdev);
+
+ kfree(vop_vdev);
}
/*
@@ -501,7 +503,9 @@ static int _vop_add_device(struct mic_device_desc __iomem *d,
dev_err(_vop_dev(vdev),
"Failed to register vop device %u type %u\n",
offset, type);
- goto free_irq;
+ vpdev->hw_ops->free_irq(vpdev, vdev->virtio_cookie, vdev);
+ put_device(&vdev->vdev.dev);
+ return ret;
}
writeq((u64)vdev, &vdev->dc->vdev);
dev_dbg(_vop_dev(vdev), "%s: registered vop device %u type %u vdev %p\n",
@@ -509,8 +513,6 @@ static int _vop...
2016 Jan 26
2
[PATCH] device/tegra: fix uninitialized IRQ number
...016, 18:44 +0900 schrieb Alexandre Courbot:
> nvkm_device_tegra_new initializes the irq member of the Tegra device
> to -1 in order to signal that it is uninitialized. However,
> nvkm_device_tegra_fini tests it against 0 to check whether an IRQ has
> been allocated or not. This leads to free_irq being called on -1
> during
> device initialization.
>
The convention in other parts of the Linux kernel is that IRQ number 0
means unallocated/invalid IRQ. So I think it is the initialization to
-1 that should be fixed instead.
> Signed-off-by: Alexandre Courbot <acourbot at nvidi...
2023 Jul 31
1
[PATCH] vdpa/mlx5: Fix crash on shutdown for when no ndev exists
..._vnet.c
> > > > @@ -3556,7 +3556,8 @@ static void mlx5v_shutdown(struct auxiliary_device
> > > > *auxdev)
> > > > ????????mgtdev = auxiliary_get_drvdata(auxdev);
> > > > ????????ndev = mgtdev->ndev;
> > > > ?
> > > > -???????free_irqs(ndev);
> > > > +???????if (ndev)
> > > > +???????????????free_irqs(ndev);
> > > > ?}
> > > > ?
> > >
> > > something I don't get:
> > > irqs are allocated in mlx5_vdpa_dev_add
> > > why are they not freed in m...
2017 Nov 24
2
[PATCH] pci: do a msi rearm on init
On my GP107 when I load nouveau after unloading it, for some reason the
GPU stopped sending or the CPU stopped receiving interrupts if MSI was
enabled.
Doing a rearm once before getting any interrupts fixes this.
Signed-off-by: Karol Herbst <kherbst at redhat.com>
---
drm/nouveau/nvkm/subdev/pci/base.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git
2008 Jun 03
12
[RFC 0/3]: hvc_console rework for platform without hard irqs
This patch set if my first attempt to make virtio_console usable on s390.
To do so, I had to change hvc_console, because s390 has no request_irq and
no free_irq.
I want to get feedback from the main users of hvc_console before I proceed.
The basic idea of this patch set is to remove the calls to request_irq and
free_irq and replace them with backend specific callbacks.
Please see the descriptions of the patches for further details:
1/3: hvc_console: rew...
2008 Jun 03
12
[RFC 0/3]: hvc_console rework for platform without hard irqs
This patch set if my first attempt to make virtio_console usable on s390.
To do so, I had to change hvc_console, because s390 has no request_irq and
no free_irq.
I want to get feedback from the main users of hvc_console before I proceed.
The basic idea of this patch set is to remove the calls to request_irq and
free_irq and replace them with backend specific callbacks.
Please see the descriptions of the patches for further details:
1/3: hvc_console: rew...
2023 Jul 31
1
[PATCH] vdpa/mlx5: Fix crash on shutdown for when no ndev exists
...t; @@ -3556,7 +3556,8 @@ static void mlx5v_shutdown(struct auxiliary_device
> > > > > *auxdev)
> > > > > ????????mgtdev = auxiliary_get_drvdata(auxdev);
> > > > > ????????ndev = mgtdev->ndev;
> > > > > ?
> > > > > -???????free_irqs(ndev);
> > > > > +???????if (ndev)
> > > > > +???????????????free_irqs(ndev);
> > > > > ?}
> > > > > ?
> > > >
> > > > something I don't get:
> > > > irqs are allocated in mlx5_vdpa_dev_add
> &g...