Displaying 20 results from an estimated 80 matches for "vp_request_msix_vectors".
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 Jan 26
0
[PATCH 2/3] virtio_pci: Use kmalloc_array() in vp_request_msix_vectors()
...| 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/virtio/virtio_pci_common.c b/drivers/virtio/virtio_pci_common.c
index 559a2b706093..623a8cea1441 100644
--- a/drivers/virtio/virtio_pci_common.c
+++ b/drivers/virtio/virtio_pci_common.c
@@ -111,9 +111,9 @@ static int vp_request_msix_vectors(struct virtio_device *vdev, int nvectors,
int err = -ENOMEM;
vp_dev->msix_vectors = nvectors;
-
- vp_dev->msix_names = kmalloc(nvectors * sizeof *vp_dev->msix_names,
- GFP_KERNEL);
+ vp_dev->msix_names = kmalloc_array(nvectors,
+ sizeof(*vp_dev->msix_names),
+...
2017 Jan 26
0
[PATCH 1/3] virtio_pci: Use kcalloc() in vp_request_msix_vectors()
...mmon.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/virtio/virtio_pci_common.c b/drivers/virtio/virtio_pci_common.c
index 186cbab327b8..559a2b706093 100644
--- a/drivers/virtio/virtio_pci_common.c
+++ b/drivers/virtio/virtio_pci_common.c
@@ -117,7 +117,7 @@ static int vp_request_msix_vectors(struct virtio_device *vdev, int nvectors,
if (!vp_dev->msix_names)
goto error;
vp_dev->msix_affinity_masks
- = kzalloc(nvectors * sizeof *vp_dev->msix_affinity_masks,
+ = kcalloc(nvectors, sizeof(*vp_dev->msix_affinity_masks),
GFP_KERNEL);
if (!vp_dev->msix_affinity_...
2017 Jan 26
4
[PATCH 0/3] Virtio: Fine-tuning for two function implementations
From: Markus Elfring <elfring at users.sourceforge.net>
Date: Thu, 26 Jan 2017 22:40:02 +0100
A few update suggestions were taken into account
from static source code analysis.
Markus Elfring (3):
virtio_pci: Use kcalloc() in vp_request_msix_vectors()
virtio_pci: Use kmalloc_array() in vp_request_msix_vectors()
virtio_ring: Use kmalloc_array() in alloc_indirect()
drivers/virtio/virtio_pci_common.c | 8 ++++----
drivers/virtio/virtio_ring.c | 3 +--
2 files changed, 5 insertions(+), 6 deletions(-)
--
2.11.0
2017 Jan 26
4
[PATCH 0/3] Virtio: Fine-tuning for two function implementations
From: Markus Elfring <elfring at users.sourceforge.net>
Date: Thu, 26 Jan 2017 22:40:02 +0100
A few update suggestions were taken into account
from static source code analysis.
Markus Elfring (3):
virtio_pci: Use kcalloc() in vp_request_msix_vectors()
virtio_pci: Use kmalloc_array() in vp_request_msix_vectors()
virtio_ring: Use kmalloc_array() in alloc_indirect()
drivers/virtio/virtio_pci_common.c | 8 ++++----
drivers/virtio/virtio_ring.c | 3 +--
2 files changed, 5 insertions(+), 6 deletions(-)
--
2.11.0
2014 Sep 15
3
[PATCH] virtio_pci: properly clean up MSI-X state when initialization fails
...---
drivers/virtio/virtio_pci.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
index 9cbac33..3d2c2a5 100644
--- a/drivers/virtio/virtio_pci.c
+++ b/drivers/virtio/virtio_pci.c
@@ -357,7 +357,7 @@ static int vp_request_msix_vectors(struct virtio_device *vdev, int nvectors,
v = ioread16(vp_dev->ioaddr + VIRTIO_MSI_CONFIG_VECTOR);
if (v == VIRTIO_MSI_NO_VECTOR) {
err = -EBUSY;
- goto error;
+ goto error_msix_used;
}
if (!per_vq_vectors) {
@@ -369,11 +369,15 @@ static int vp_request_msix_vectors(struct virtio_d...
2014 Sep 15
3
[PATCH] virtio_pci: properly clean up MSI-X state when initialization fails
...---
drivers/virtio/virtio_pci.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
index 9cbac33..3d2c2a5 100644
--- a/drivers/virtio/virtio_pci.c
+++ b/drivers/virtio/virtio_pci.c
@@ -357,7 +357,7 @@ static int vp_request_msix_vectors(struct virtio_device *vdev, int nvectors,
v = ioread16(vp_dev->ioaddr + VIRTIO_MSI_CONFIG_VECTOR);
if (v == VIRTIO_MSI_NO_VECTOR) {
err = -EBUSY;
- goto error;
+ goto error_msix_used;
}
if (!per_vq_vectors) {
@@ -369,11 +369,15 @@ static int vp_request_msix_vectors(struct virtio_d...
2013 Jun 20
3
[PATCH] virtio-pci: fix leaks of msix_affinity_masks
...uct virtio_device *vdev)
pci_disable_msix(vp_dev->pci_dev);
vp_dev->msix_enabled = 0;
- vp_dev->msix_vectors = 0;
}
+ vp_dev->msix_vectors = 0;
vp_dev->msix_used_vectors = 0;
kfree(vp_dev->msix_names);
vp_dev->msix_names = NULL;
@@ -309,6 +309,8 @@ static int vp_request_msix_vectors(struct virtio_device *vdev, int nvectors,
unsigned i, v;
int err = -ENOMEM;
+ vp_dev->msix_vectors = nvectors;
+
vp_dev->msix_entries = kmalloc(nvectors * sizeof *vp_dev->msix_entries,
GFP_KERNEL);
if (!vp_dev->msix_entries)
@@ -336,7 +338,6 @@ static int vp_reques...
2013 Jun 20
3
[PATCH] virtio-pci: fix leaks of msix_affinity_masks
...uct virtio_device *vdev)
pci_disable_msix(vp_dev->pci_dev);
vp_dev->msix_enabled = 0;
- vp_dev->msix_vectors = 0;
}
+ vp_dev->msix_vectors = 0;
vp_dev->msix_used_vectors = 0;
kfree(vp_dev->msix_names);
vp_dev->msix_names = NULL;
@@ -309,6 +309,8 @@ static int vp_request_msix_vectors(struct virtio_device *vdev, int nvectors,
unsigned i, v;
int err = -ENOMEM;
+ vp_dev->msix_vectors = nvectors;
+
vp_dev->msix_entries = kmalloc(nvectors * sizeof *vp_dev->msix_entries,
GFP_KERNEL);
if (!vp_dev->msix_entries)
@@ -336,7 +338,6 @@ static int vp_reques...
2013 Jun 19
2
[PATCH] virtio-pci: fix leaks of msix_affinity_masks
...>
---
drivers/virtio/virtio_pci.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
index a7ce730..3c0a6ef 100644
--- a/drivers/virtio/virtio_pci.c
+++ b/drivers/virtio/virtio_pci.c
@@ -309,6 +309,8 @@ static int vp_request_msix_vectors(struct virtio_device *vdev, int nvectors,
unsigned i, v;
int err = -ENOMEM;
+ vp_dev->msix_vectors = nvectors;
+
vp_dev->msix_entries = kmalloc(nvectors * sizeof *vp_dev->msix_entries,
GFP_KERNEL);
if (!vp_dev->msix_entries)
@@ -336,7 +338,6 @@ static int vp_reques...
2013 Jun 19
2
[PATCH] virtio-pci: fix leaks of msix_affinity_masks
...>
---
drivers/virtio/virtio_pci.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
index a7ce730..3c0a6ef 100644
--- a/drivers/virtio/virtio_pci.c
+++ b/drivers/virtio/virtio_pci.c
@@ -309,6 +309,8 @@ static int vp_request_msix_vectors(struct virtio_device *vdev, int nvectors,
unsigned i, v;
int err = -ENOMEM;
+ vp_dev->msix_vectors = nvectors;
+
vp_dev->msix_entries = kmalloc(nvectors * sizeof *vp_dev->msix_entries,
GFP_KERNEL);
if (!vp_dev->msix_entries)
@@ -336,7 +338,6 @@ static int vp_reques...
2011 Apr 20
1
[PATCH] driver, virtio: Modify the err hanlding logic
From: Liu Yuan <tailai.ly at taobao.com>
In the function vp_request_msix_vectors(), when
pci_enable_msix() returns 0, there will be
redundant double checks for 'err'. This patch
fixes it to avoid the unnecessary check.
Signed-off-by: Liu Yuan <tailai.ly at taobao.com>
---
drivers/virtio/virtio_pci.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-...
2011 Apr 20
1
[PATCH] driver, virtio: Modify the err hanlding logic
From: Liu Yuan <tailai.ly at taobao.com>
In the function vp_request_msix_vectors(), when
pci_enable_msix() returns 0, there will be
redundant double checks for 'err'. This patch
fixes it to avoid the unnecessary check.
Signed-off-by: Liu Yuan <tailai.ly at taobao.com>
---
drivers/virtio/virtio_pci.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-...
2014 Apr 19
1
RFC: sharing config interrupt between virtio devices for saving MSI
...db3f..5ba348d 100644
--- a/drivers/virtio/virtio_pci.c
+++ b/drivers/virtio/virtio_pci.c
@@ -302,6 +302,8 @@ static void vp_free_vectors(struct virtio_device *vdev)
vp_dev->msix_affinity_masks = NULL;
}
+//static msix_entry *config_msix_entry;
+static char config_msix_name[100];
static int vp_request_msix_vectors(struct virtio_device *vdev, int nvectors,
bool per_vq_vectors)
{
@@ -341,14 +343,13 @@ static int vp_request_msix_vectors(struct virtio_device *vdev, int nvectors,
/* Set the vector used for configuration */
v = vp_dev->msix_used_vectors;
- snprintf(vp_dev->msix_names[v], sizeo...
2014 Apr 19
1
RFC: sharing config interrupt between virtio devices for saving MSI
...db3f..5ba348d 100644
--- a/drivers/virtio/virtio_pci.c
+++ b/drivers/virtio/virtio_pci.c
@@ -302,6 +302,8 @@ static void vp_free_vectors(struct virtio_device *vdev)
vp_dev->msix_affinity_masks = NULL;
}
+//static msix_entry *config_msix_entry;
+static char config_msix_name[100];
static int vp_request_msix_vectors(struct virtio_device *vdev, int nvectors,
bool per_vq_vectors)
{
@@ -341,14 +343,13 @@ static int vp_request_msix_vectors(struct virtio_device *vdev, int nvectors,
/* Set the vector used for configuration */
v = vp_dev->msix_used_vectors;
- snprintf(vp_dev->msix_names[v], sizeo...
2014 Sep 01
3
[PATCH RFC] virtio-pci: share config interrupt between virtio devices
.../
- iowrite16(VIRTIO_MSI_NO_VECTOR,
- vp_dev->ioaddr + VIRTIO_MSI_CONFIG_VECTOR);
- /* Flush the write out to device */
- ioread16(vp_dev->ioaddr + VIRTIO_MSI_CONFIG_VECTOR);
-
pci_disable_msix(vp_dev->pci_dev);
vp_dev->msix_enabled = 0;
}
@@ -339,24 +334,18 @@ static int vp_request_msix_vectors(struct virtio_device *vdev, int nvectors,
goto error;
vp_dev->msix_enabled = 1;
- /* Set the vector used for configuration */
- v = vp_dev->msix_used_vectors;
- snprintf(vp_dev->msix_names[v], sizeof *vp_dev->msix_names,
+ /* Set shared IRQ for configuration */
+ snprintf(vp_dev-...
2014 Sep 01
3
[PATCH RFC] virtio-pci: share config interrupt between virtio devices
.../
- iowrite16(VIRTIO_MSI_NO_VECTOR,
- vp_dev->ioaddr + VIRTIO_MSI_CONFIG_VECTOR);
- /* Flush the write out to device */
- ioread16(vp_dev->ioaddr + VIRTIO_MSI_CONFIG_VECTOR);
-
pci_disable_msix(vp_dev->pci_dev);
vp_dev->msix_enabled = 0;
}
@@ -339,24 +334,18 @@ static int vp_request_msix_vectors(struct virtio_device *vdev, int nvectors,
goto error;
vp_dev->msix_enabled = 1;
- /* Set the vector used for configuration */
- v = vp_dev->msix_used_vectors;
- snprintf(vp_dev->msix_names[v], sizeof *vp_dev->msix_names,
+ /* Set shared IRQ for configuration */
+ snprintf(vp_dev-...
2014 Sep 15
1
[PATCH] virtio_pci: properly clean up MSI-X state when initialization fails
...file changed, 6 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
>> index 9cbac33..3d2c2a5 100644
>> --- a/drivers/virtio/virtio_pci.c
>> +++ b/drivers/virtio/virtio_pci.c
>> @@ -357,7 +357,7 @@ static int vp_request_msix_vectors(struct virtio_device *vdev, int nvectors,
>> v = ioread16(vp_dev->ioaddr + VIRTIO_MSI_CONFIG_VECTOR);
>> if (v == VIRTIO_MSI_NO_VECTOR) {
>> err = -EBUSY;
>> - goto error;
>> + goto error_msix_used;
>> }...
2014 Sep 15
1
[PATCH] virtio_pci: properly clean up MSI-X state when initialization fails
...file changed, 6 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
>> index 9cbac33..3d2c2a5 100644
>> --- a/drivers/virtio/virtio_pci.c
>> +++ b/drivers/virtio/virtio_pci.c
>> @@ -357,7 +357,7 @@ static int vp_request_msix_vectors(struct virtio_device *vdev, int nvectors,
>> v = ioread16(vp_dev->ioaddr + VIRTIO_MSI_CONFIG_VECTOR);
>> if (v == VIRTIO_MSI_NO_VECTOR) {
>> err = -EBUSY;
>> - goto error;
>> + goto error_msix_used;
>> }...