search for: virtio_pmem_prob

Displaying 20 results from an estimated 50 matches for "virtio_pmem_prob".

Did you mean: virtio_pmem_probe
2019 May 14
2
[PATCH v8 2/6] virtio-pmem: Add virtio pmem driver
...39;t like return from multiple places instead I prefer > single exit point from function. Makes this function more complicated than necessary. I agree when there are locks involved. > >> >>> + >>> + return 0; >>> +}; >>> + >>> +static int virtio_pmem_probe(struct virtio_device *vdev) >>> +{ >>> + int err = 0; >>> + struct resource res; >>> + struct virtio_pmem *vpmem; >>> + struct nd_region_desc ndr_desc = {}; >>> + int nid = dev_to_node(&vdev->dev); >>> + struct nd_region *nd_reg...
2019 May 14
2
[PATCH v8 2/6] virtio-pmem: Add virtio pmem driver
...39;t like return from multiple places instead I prefer > single exit point from function. Makes this function more complicated than necessary. I agree when there are locks involved. > >> >>> + >>> + return 0; >>> +}; >>> + >>> +static int virtio_pmem_probe(struct virtio_device *vdev) >>> +{ >>> + int err = 0; >>> + struct resource res; >>> + struct virtio_pmem *vpmem; >>> + struct nd_region_desc ndr_desc = {}; >>> + int nid = dev_to_node(&vdev->dev); >>> + struct nd_region *nd_reg...
2019 Apr 10
3
[PATCH v5 2/5] virtio-pmem: Add virtio pmem driver
...sonally not a fan of chained assignments... I think I'd just drop the 'vq' variable and operate on vpmem->req_vq directly. > + > + spin_lock_init(&vpmem->pmem_lock); > + INIT_LIST_HEAD(&vpmem->req_list); > + > + return 0; > +}; > + > +static int virtio_pmem_probe(struct virtio_device *vdev) > +{ > + int err = 0; > + struct resource res; > + struct virtio_pmem *vpmem; > + struct nvdimm_bus *nvdimm_bus; > + struct nd_region_desc ndr_desc = {}; > + int nid = dev_to_node(&vdev->dev); > + struct nd_region *nd_region; > + > +...
2019 Apr 10
3
[PATCH v5 2/5] virtio-pmem: Add virtio pmem driver
...sonally not a fan of chained assignments... I think I'd just drop the 'vq' variable and operate on vpmem->req_vq directly. > + > + spin_lock_init(&vpmem->pmem_lock); > + INIT_LIST_HEAD(&vpmem->req_list); > + > + return 0; > +}; > + > +static int virtio_pmem_probe(struct virtio_device *vdev) > +{ > + int err = 0; > + struct resource res; > + struct virtio_pmem *vpmem; > + struct nvdimm_bus *nvdimm_bus; > + struct nd_region_desc ndr_desc = {}; > + int nid = dev_to_node(&vdev->dev); > + struct nd_region *nd_region; > + > +...
2019 May 14
2
[PATCH v8 2/6] virtio-pmem: Add virtio pmem driver
...host_ack, "flush_queue"); Nit: Wrong indentation of parameters. > + if (IS_ERR(vpmem->req_vq)) > + return PTR_ERR(vpmem->req_vq); > + > + spin_lock_init(&vpmem->pmem_lock); > + INIT_LIST_HEAD(&vpmem->req_list); I would initialize the locks in the virtio_pmem_probe() directly, earlier (directly after allocating vpmem). > + > + return 0; > +}; > + > +static int virtio_pmem_probe(struct virtio_device *vdev) > +{ > + int err = 0; > + struct resource res; > + struct virtio_pmem *vpmem; > + struct nd_region_desc ndr_desc = {}; >...
2019 May 14
2
[PATCH v8 2/6] virtio-pmem: Add virtio pmem driver
...host_ack, "flush_queue"); Nit: Wrong indentation of parameters. > + if (IS_ERR(vpmem->req_vq)) > + return PTR_ERR(vpmem->req_vq); > + > + spin_lock_init(&vpmem->pmem_lock); > + INIT_LIST_HEAD(&vpmem->req_list); I would initialize the locks in the virtio_pmem_probe() directly, earlier (directly after allocating vpmem). > + > + return 0; > +}; > + > +static int virtio_pmem_probe(struct virtio_device *vdev) > +{ > + int err = 0; > + struct resource res; > + struct virtio_pmem *vpmem; > + struct nd_region_desc ndr_desc = {}; >...
2019 May 15
5
[PATCH v9 2/7] virtio-pmem: Add virtio pmem driver
...register(nvdimm_bus); > + vdev->config->del_vqs(vdev); > + vdev->config->reset(vdev); > +} > + > +static struct virtio_driver virtio_pmem_driver = { > + .driver.name = KBUILD_MODNAME, > + .driver.owner = THIS_MODULE, > + .id_table = id_table, > + .probe = virtio_pmem_probe, > + .remove = virtio_pmem_remove, > +}; > + > +module_virtio_driver(virtio_pmem_driver); > +MODULE_DEVICE_TABLE(virtio, id_table); > +MODULE_DESCRIPTION("Virtio pmem driver"); > +MODULE_LICENSE("GPL"); > diff --git a/drivers/nvdimm/virtio_pmem.h b/dri...
2019 May 15
5
[PATCH v9 2/7] virtio-pmem: Add virtio pmem driver
...register(nvdimm_bus); > + vdev->config->del_vqs(vdev); > + vdev->config->reset(vdev); > +} > + > +static struct virtio_driver virtio_pmem_driver = { > + .driver.name = KBUILD_MODNAME, > + .driver.owner = THIS_MODULE, > + .id_table = id_table, > + .probe = virtio_pmem_probe, > + .remove = virtio_pmem_remove, > +}; > + > +module_virtio_driver(virtio_pmem_driver); > +MODULE_DEVICE_TABLE(virtio, id_table); > +MODULE_DESCRIPTION("Virtio pmem driver"); > +MODULE_LICENSE("GPL"); > diff --git a/drivers/nvdimm/virtio_pmem.h b/dri...
2019 May 14
1
[PATCH v8 2/6] virtio-pmem: Add virtio pmem driver
>> >> I think you should do the same here, vdev->priv is allocated in >> virtio_pmem_probe. >> >> But maybe I am missing something important here :) > > Because virtio_balloon use "kzalloc" for allocation and needs to be freed. > But virtio pmem uses "devm_kzalloc" which takes care of automatically deleting > the device memory when associat...
2019 May 14
0
[PATCH v8 2/6] virtio-pmem: Add virtio pmem driver
...gt; > Makes this function more complicated than necessary. I agree when there > are locks involved. o.k. I will change as you suggest :) > > > > >> > >>> + > >>> + return 0; > >>> +}; > >>> + > >>> +static int virtio_pmem_probe(struct virtio_device *vdev) > >>> +{ > >>> + int err = 0; > >>> + struct resource res; > >>> + struct virtio_pmem *vpmem; > >>> + struct nd_region_desc ndr_desc = {}; > >>> + int nid = dev_to_node(&vdev->dev); > >...
2019 May 14
0
[PATCH v8 2/6] virtio-pmem: Add virtio pmem driver
...Wrong indentation of parameters. o.k > > > + if (IS_ERR(vpmem->req_vq)) > > + return PTR_ERR(vpmem->req_vq); > > + > > + spin_lock_init(&vpmem->pmem_lock); > > + INIT_LIST_HEAD(&vpmem->req_list); > > I would initialize the locks in the virtio_pmem_probe() directly, > earlier (directly after allocating vpmem). Since the lock is to protect the vq so logically I put it in 'init_vq' which is eventually called by probe. > > > + > > + return 0; > > +}; > > + > > +static int virtio_pmem_probe(struct virtio...
2019 Apr 10
0
[PATCH v5 2/5] virtio-pmem: Add virtio pmem driver
...ctly. > > +1 Will drop extra vq. > > > > > > + > > > + spin_lock_init(&vpmem->pmem_lock); > > > + INIT_LIST_HEAD(&vpmem->req_list); > > > + > > > + return 0; > > > +}; > > > + > > > +static int virtio_pmem_probe(struct virtio_device *vdev) > > > +{ > > > + int err = 0; > > > + struct resource res; > > > + struct virtio_pmem *vpmem; > > > + struct nvdimm_bus *nvdimm_bus; > > > + struct nd_region_desc ndr_desc = {}; > > > + int nid = dev_to_node...
2019 Apr 10
0
[PATCH v5 2/5] virtio-pmem: Add virtio pmem driver
...39;d just > drop the 'vq' variable and operate on vpmem->req_vq directly. +1 > > > + > > + spin_lock_init(&vpmem->pmem_lock); > > + INIT_LIST_HEAD(&vpmem->req_list); > > + > > + return 0; > > +}; > > + > > +static int virtio_pmem_probe(struct virtio_device *vdev) > > +{ > > + int err = 0; > > + struct resource res; > > + struct virtio_pmem *vpmem; > > + struct nvdimm_bus *nvdimm_bus; > > + struct nd_region_desc ndr_desc = {}; > > + int nid = dev_to_node(&vdev->dev); > > + st...
2019 May 07
2
[PATCH v7 2/6] virtio-pmem: Add virtio pmem driver
...ot;flush_queue"); > + if (IS_ERR(vpmem->req_vq)) > + return PTR_ERR(vpmem->req_vq); > + > + spin_lock_init(&vpmem->pmem_lock); > + INIT_LIST_HEAD(&vpmem->req_list); > + > + return 0; > +}; > + > +static int virtio_pmem_probe(struct virtio_device *vdev) > +{ > + int err = 0; > + struct resource res; > + struct virtio_pmem *vpmem; > + struct nd_region_desc ndr_desc = {}; > + int nid = dev_to_node(&vdev->dev); > + struct nd_region *nd_region; > + > +...
2019 May 07
2
[PATCH v7 2/6] virtio-pmem: Add virtio pmem driver
...ot;flush_queue"); > + if (IS_ERR(vpmem->req_vq)) > + return PTR_ERR(vpmem->req_vq); > + > + spin_lock_init(&vpmem->pmem_lock); > + INIT_LIST_HEAD(&vpmem->req_list); > + > + return 0; > +}; > + > +static int virtio_pmem_probe(struct virtio_device *vdev) > +{ > + int err = 0; > + struct resource res; > + struct virtio_pmem *vpmem; > + struct nd_region_desc ndr_desc = {}; > + int nid = dev_to_node(&vdev->dev); > + struct nd_region *nd_region; > + > +...
2019 May 10
1
[Qemu-devel] [PATCH v7 2/6] virtio-pmem: Add virtio pmem driver
...return PTR_ERR(vpmem->req_vq); > > > + > > > + spin_lock_init(&vpmem->pmem_lock); > > > + INIT_LIST_HEAD(&vpmem->req_list); > > > + > > > + return 0; > > > +}; > > > + > > > +static int virtio_pmem_probe(struct virtio_device *vdev) > > > +{ > > > + int err = 0; > > > + struct resource res; > > > + struct virtio_pmem *vpmem; > > > + struct nd_region_desc ndr_desc = {}; > > > + int nid = dev_to_node(&vdev->dev...
2019 Apr 03
2
[Qemu-devel] [PATCH v4 2/5] virtio-pmem: Add virtio pmem driver
...q = virtio_find_single_vq(vpmem->vdev, > + host_ack, "flush_queue"); > + if (IS_ERR(vq)) > + return PTR_ERR(vq); > + > + spin_lock_init(&vpmem->pmem_lock); > + INIT_LIST_HEAD(&vpmem->req_list); > + > + return 0; > +}; > + > +static int virtio_pmem_probe(struct virtio_device *vdev) > +{ > + int err = 0; > + struct resource res; > + struct virtio_pmem *vpmem; > + struct nvdimm_bus *nvdimm_bus; > + struct nd_region_desc ndr_desc; > + int nid = dev_to_node(&vdev->dev); > + struct nd_region *nd_region; > + > + if (...
2019 Apr 03
2
[Qemu-devel] [PATCH v4 2/5] virtio-pmem: Add virtio pmem driver
...q = virtio_find_single_vq(vpmem->vdev, > + host_ack, "flush_queue"); > + if (IS_ERR(vq)) > + return PTR_ERR(vq); > + > + spin_lock_init(&vpmem->pmem_lock); > + INIT_LIST_HEAD(&vpmem->req_list); > + > + return 0; > +}; > + > +static int virtio_pmem_probe(struct virtio_device *vdev) > +{ > + int err = 0; > + struct resource res; > + struct virtio_pmem *vpmem; > + struct nvdimm_bus *nvdimm_bus; > + struct nd_region_desc ndr_desc; > + int nid = dev_to_node(&vdev->dev); > + struct nd_region *nd_region; > + > + if (...
2019 Apr 30
1
[Qemu-devel] [PATCH v7 2/6] virtio-pmem: Add virtio pmem driver
...mem->vdev, > + host_ack, "flush_queue"); > + if (IS_ERR(vpmem->req_vq)) > + return PTR_ERR(vpmem->req_vq); > + > + spin_lock_init(&vpmem->pmem_lock); > + INIT_LIST_HEAD(&vpmem->req_list); > + > + return 0; > +}; > + > +static int virtio_pmem_probe(struct virtio_device *vdev) > +{ > + int err = 0; > + struct resource res; > + struct virtio_pmem *vpmem; > + struct nd_region_desc ndr_desc = {}; > + int nid = dev_to_node(&vdev->dev); > + struct nd_region *nd_region; > + > + if (!vdev->config->get) { >...
2019 May 12
1
[PATCH v8 2/6] virtio-pmem: Add virtio pmem driver
...mem->vdev, > + host_ack, "flush_queue"); > + if (IS_ERR(vpmem->req_vq)) > + return PTR_ERR(vpmem->req_vq); > + > + spin_lock_init(&vpmem->pmem_lock); > + INIT_LIST_HEAD(&vpmem->req_list); > + > + return 0; > +}; > + > +static int virtio_pmem_probe(struct virtio_device *vdev) > +{ > + int err = 0; > + struct resource res; > + struct virtio_pmem *vpmem; > + struct nd_region_desc ndr_desc = {}; > + int nid = dev_to_node(&vdev->dev); > + struct nd_region *nd_region; > + > + if (!vdev->config->get) { >...