search for: virtio_mmio_prob

Displaying 20 results from an estimated 106 matches for "virtio_mmio_prob".

Did you mean: virtio_mmio_probe
2017 Dec 01
2
[PATCH] virtio_mmio: add cleanup for virtio_mmio_probe
cleanup all resource allocated by virtio_mmio_probe. Signed-off-by: weiping zhang <zhangweiping at didichuxing.com> --- drivers/virtio/virtio_mmio.c | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c index 74dc717..3fd0e66 100644...
2017 Dec 01
2
[PATCH] virtio_mmio: add cleanup for virtio_mmio_probe
cleanup all resource allocated by virtio_mmio_probe. Signed-off-by: weiping zhang <zhangweiping at didichuxing.com> --- drivers/virtio/virtio_mmio.c | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c index 74dc717..3fd0e66 100644...
2017 Dec 05
0
[PATCH v2 1/2] virtio_mmio: add cleanup for virtio_mmio_probe
...@vm_dev by contianer_of(@dev), but in this case we need release @mem resource from @pdev and vm_dev->base. It make @pdev->vm_dev.dev.release() too complicated, so put_device just put the reference of register_virtio_device->device_register->device_initialize and release all resource in virtio_mmio_probe. Signed-off-by: weiping zhang <zhangweiping at didichuxing.com> --- drivers/virtio/virtio_mmio.c | 36 ++++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c index 74dc717..f984510 1006...
2017 Dec 06
0
[PATCH v3 1/2] virtio_mmio: add cleanup for virtio_mmio_probe
...+ container_of(_d, struct virtio_device, dev); + struct virtio_mmio_device *vm_dev = + container_of(vdev, struct virtio_mmio_device, vdev); + struct platform_device *pdev = vm_dev->pdev; + + devm_kfree(&pdev->dev, vm_dev); +} /* Platform device */ @@ -513,25 +522,30 @@ static int virtio_mmio_probe(struct platform_device *pdev) return -EBUSY; vm_dev = devm_kzalloc(&pdev->dev, sizeof(*vm_dev), GFP_KERNEL); - if (!vm_dev) - return -ENOMEM; + if (!vm_dev) { + rc = -ENOMEM; + goto free_mem; + } vm_dev->vdev.dev.parent = &pdev->dev; - vm_dev->vdev.dev.release =...
2017 Dec 05
3
[PATCH v2 0/2] Add cleanup for virtio_mmio driver
this patchset try to add cleanup for virtio_mmio driver, include virtio_mmio_probe and virtio_mmio_remove weiping zhang (2): virtio_mmio: add cleanup for virtio_mmio_probe virtio_mmio: add cleanup for virtio_mmio_remove drivers/virtio/virtio_mmio.c | 43 +++++++++++++++++++++++++++++++++++-------- 1 file changed, 35 insertions(+), 8 deletions(-) -- 2.9.4
2017 Dec 05
3
[PATCH v2 0/2] Add cleanup for virtio_mmio driver
this patchset try to add cleanup for virtio_mmio driver, include virtio_mmio_probe and virtio_mmio_remove weiping zhang (2): virtio_mmio: add cleanup for virtio_mmio_probe virtio_mmio: add cleanup for virtio_mmio_remove drivers/virtio/virtio_mmio.c | 43 +++++++++++++++++++++++++++++++++++-------- 1 file changed, 35 insertions(+), 8 deletions(-) -- 2.9.4
2017 Dec 04
0
[PATCH] virtio_mmio: add cleanup for virtio_mmio_probe
On Sat, 2 Dec 2017 01:51:40 +0800 weiping zhang <zwp10758 at gmail.com> wrote: > cleanup all resource allocated by virtio_mmio_probe. > > Signed-off-by: weiping zhang <zhangweiping at didichuxing.com> > --- > drivers/virtio/virtio_mmio.c | 34 ++++++++++++++++++++++++++-------- > 1 file changed, 26 insertions(+), 8 deletions(-) > > diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_m...
2017 Dec 06
4
[PATCH v3 0/2] Add cleanup for virtio_mmio driver
this patchset try to add cleanup for virtio_mmio driver, include virtio_mmio_probe and virtio_mmio_remove weiping zhang (2): virtio_mmio: add cleanup for virtio_mmio_probe virtio_mmio: add cleanup for virtio_mmio_remove drivers/virtio/virtio_mmio.c | 57 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 47 insertions(+), 10 deletions(-) -- 2.9.4
2017 Dec 06
4
[PATCH v3 0/2] Add cleanup for virtio_mmio driver
this patchset try to add cleanup for virtio_mmio driver, include virtio_mmio_probe and virtio_mmio_remove weiping zhang (2): virtio_mmio: add cleanup for virtio_mmio_probe virtio_mmio: add cleanup for virtio_mmio_remove drivers/virtio/virtio_mmio.c | 57 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 47 insertions(+), 10 deletions(-) -- 2.9.4
2017 Dec 06
1
[PATCH v2 1/2] virtio_mmio: add cleanup for virtio_mmio_probe
...r_of(@dev), but in this case > we need release @mem resource from @pdev and vm_dev->base. It make > @pdev->vm_dev.dev.release() too complicated, so put_device just put the > reference of register_virtio_device->device_register->device_initialize > and release all resource in virtio_mmio_probe. Releasing the resources when unwinding on error can work, but I think there still are some issues (more below). This is all very tangly code :( > > Signed-off-by: weiping zhang <zhangweiping at didichuxing.com> > --- > drivers/virtio/virtio_mmio.c | 36 ++++++++++++++++++++++...
2017 Dec 06
1
[PATCH v2 1/2] virtio_mmio: add cleanup for virtio_mmio_probe
...r_of(@dev), but in this case > we need release @mem resource from @pdev and vm_dev->base. It make > @pdev->vm_dev.dev.release() too complicated, so put_device just put the > reference of register_virtio_device->device_register->device_initialize > and release all resource in virtio_mmio_probe. Releasing the resources when unwinding on error can work, but I think there still are some issues (more below). This is all very tangly code :( > > Signed-off-by: weiping zhang <zhangweiping at didichuxing.com> > --- > drivers/virtio/virtio_mmio.c | 36 ++++++++++++++++++++++...
2017 Dec 12
2
[PATCH] virtio_mmio: fix devm cleanup
...he devm infrastructure will do for us when our probe function returns an error code. We only need to ensure that we call put_device() if a call to register_virtio_device() fails. Signed-off-by: Mark Rutland <mark.rutland at arm.com> Fixes: 7eb781b1bbb7136f ("virtio_mmio: add cleanup for virtio_mmio_probe") Cc: Cornelia Huck <cohuck at redhat.com> Cc: Michael S. Tsirkin <mst at redhat.com> Cc: weiping zhang <zhangweiping at didichuxing.com> Cc: virtualization at lists.linux-foundation.org --- drivers/virtio/virtio_mmio.c | 36 +++++++++--------------------------- 1 file chan...
2017 Dec 12
2
[PATCH] virtio_mmio: fix devm cleanup
...he devm infrastructure will do for us when our probe function returns an error code. We only need to ensure that we call put_device() if a call to register_virtio_device() fails. Signed-off-by: Mark Rutland <mark.rutland at arm.com> Fixes: 7eb781b1bbb7136f ("virtio_mmio: add cleanup for virtio_mmio_probe") Cc: Cornelia Huck <cohuck at redhat.com> Cc: Michael S. Tsirkin <mst at redhat.com> Cc: weiping zhang <zhangweiping at didichuxing.com> Cc: virtualization at lists.linux-foundation.org --- drivers/virtio/virtio_mmio.c | 36 +++++++++--------------------------- 1 file chan...
2017 Dec 12
4
[PATCHv2] virtio_mmio: fix devm cleanup
...ction returns an error code, or when our remove function returns. We only need to ensure that we call put_device() if a call to register_virtio_device() fails in the probe path. Signed-off-by: Mark Rutland <mark.rutland at arm.com> Fixes: 7eb781b1bbb7136f ("virtio_mmio: add cleanup for virtio_mmio_probe") Fixes: 25f32223bce5c580 ("virtio_mmio: add cleanup for virtio_mmio_remove") Cc: Cornelia Huck <cohuck at redhat.com> Cc: Michael S. Tsirkin <mst at redhat.com> Cc: weiping zhang <zhangweiping at didichuxing.com> Cc: virtualization at lists.linux-foundation.org --...
2017 Dec 12
4
[PATCHv2] virtio_mmio: fix devm cleanup
...ction returns an error code, or when our remove function returns. We only need to ensure that we call put_device() if a call to register_virtio_device() fails in the probe path. Signed-off-by: Mark Rutland <mark.rutland at arm.com> Fixes: 7eb781b1bbb7136f ("virtio_mmio: add cleanup for virtio_mmio_probe") Fixes: 25f32223bce5c580 ("virtio_mmio: add cleanup for virtio_mmio_remove") Cc: Cornelia Huck <cohuck at redhat.com> Cc: Michael S. Tsirkin <mst at redhat.com> Cc: weiping zhang <zhangweiping at didichuxing.com> Cc: virtualization at lists.linux-foundation.org --...
2017 Dec 12
0
[PATCH] virtio_mmio: fix devm cleanup
...vice() fails. OK, that was the subtility I obviously missed. Reading through the code, this seems correct (although I find the infrastructure a bit unintuitive). > > Signed-off-by: Mark Rutland <mark.rutland at arm.com> > Fixes: 7eb781b1bbb7136f ("virtio_mmio: add cleanup for virtio_mmio_probe") > Cc: Cornelia Huck <cohuck at redhat.com> > Cc: Michael S. Tsirkin <mst at redhat.com> > Cc: weiping zhang <zhangweiping at didichuxing.com> > Cc: virtualization at lists.linux-foundation.org > --- > drivers/virtio/virtio_mmio.c | 36 +++++++++----------...
2014 Oct 25
0
[RFC PATCH 1/2] Add a new register offset let interrupt reason available
...drivers/virtio/virtio_mmio.c +++ b/drivers/virtio/virtio_mmio.c @@ -122,6 +122,8 @@ struct virtio_mmio_device { /* a list of queues so we can dispatch IRQs */ spinlock_t lock; struct list_head virtqueues; + + uint8_t *isr_mem; }; struct virtio_mmio_vq_info { @@ -443,6 +445,7 @@ static int virtio_mmio_probe(struct platform_device *pdev) struct virtio_mmio_device *vm_dev; struct resource *mem; unsigned long magic; + int err; mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (!mem) @@ -481,6 +484,15 @@ static int virtio_mmio_probe(struct platform_device *pdev) return -ENXIO; }...
2017 Jan 10
5
[PATCH] virtio_mmio: Set DMA masks appropriately
.../drivers/virtio/virtio_mmio.c @@ -59,6 +59,7 @@ #define pr_fmt(fmt) "virtio-mmio: " fmt #include <linux/acpi.h> +#include <linux/dma-mapping.h> #include <linux/highmem.h> #include <linux/interrupt.h> #include <linux/io.h> @@ -497,6 +498,7 @@ static int virtio_mmio_probe(struct platform_device *pdev) struct virtio_mmio_device *vm_dev; struct resource *mem; unsigned long magic; + int rc; mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (!mem) @@ -548,6 +550,14 @@ static int virtio_mmio_probe(struct platform_device *pdev) if (vm_dev->version...
2017 Jan 10
5
[PATCH] virtio_mmio: Set DMA masks appropriately
.../drivers/virtio/virtio_mmio.c @@ -59,6 +59,7 @@ #define pr_fmt(fmt) "virtio-mmio: " fmt #include <linux/acpi.h> +#include <linux/dma-mapping.h> #include <linux/highmem.h> #include <linux/interrupt.h> #include <linux/io.h> @@ -497,6 +498,7 @@ static int virtio_mmio_probe(struct platform_device *pdev) struct virtio_mmio_device *vm_dev; struct resource *mem; unsigned long magic; + int rc; mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (!mem) @@ -548,6 +550,14 @@ static int virtio_mmio_probe(struct platform_device *pdev) if (vm_dev->version...
2017 Dec 12
0
[PATCHv2] virtio_mmio: fix devm cleanup
...or when our remove function returns. > > We only need to ensure that we call put_device() if a call to > register_virtio_device() fails in the probe path. > > Signed-off-by: Mark Rutland <mark.rutland at arm.com> > Fixes: 7eb781b1bbb7136f ("virtio_mmio: add cleanup for virtio_mmio_probe") > Fixes: 25f32223bce5c580 ("virtio_mmio: add cleanup for virtio_mmio_remove") > Cc: Cornelia Huck <cohuck at redhat.com> > Cc: Michael S. Tsirkin <mst at redhat.com> > Cc: weiping zhang <zhangweiping at didichuxing.com> > Cc: virtualization at list...