search for: vdpa_init

Displaying 10 results from an estimated 10 matches for "vdpa_init".

Did you mean: ida_init
2020 Feb 11
2
[PATCH V2 3/5] vDPA: introduce vDPA bus
On Mon, Feb 10, 2020 at 11:56:06AM +0800, Jason Wang wrote: > +/** > + * vdpa_register_device - register a vDPA device > + * Callers must have a succeed call of vdpa_init_device() before. > + * @vdev: the vdpa device to be registered to vDPA bus > + * > + * Returns an error when fail to add to vDPA bus > + */ > +int vdpa_register_device(struct vdpa_device *vdev) > +{ > + int err = device_add(&vdev->dev); > + > + if (err) { > + p...
2020 Feb 11
2
[PATCH V2 3/5] vDPA: introduce vDPA bus
On Mon, Feb 10, 2020 at 11:56:06AM +0800, Jason Wang wrote: > +/** > + * vdpa_register_device - register a vDPA device > + * Callers must have a succeed call of vdpa_init_device() before. > + * @vdev: the vdpa device to be registered to vDPA bus > + * > + * Returns an error when fail to add to vDPA bus > + */ > +int vdpa_register_device(struct vdpa_device *vdev) > +{ > + int err = device_add(&vdev->dev); > + > + if (err) { > + p...
2020 Feb 12
0
[PATCH V2 3/5] vDPA: introduce vDPA bus
On 2020/2/11 ??9:47, Jason Gunthorpe wrote: > On Mon, Feb 10, 2020 at 11:56:06AM +0800, Jason Wang wrote: >> +/** >> + * vdpa_register_device - register a vDPA device >> + * Callers must have a succeed call of vdpa_init_device() before. >> + * @vdev: the vdpa device to be registered to vDPA bus >> + * >> + * Returns an error when fail to add to vDPA bus >> + */ >> +int vdpa_register_device(struct vdpa_device *vdev) >> +{ >> + int err = device_add(&vdev->dev); >&g...
2020 Jul 17
0
[PATCH V2 3/6] vDPA: implement IRQ offloading helpers in vDPA core
...a_alloc_vq_irq); > + > +void vdpa_free_vq_irq(struct device *dev, struct vdpa_device *vdev, int irq, > + int qid, void *dev_id) > +{ > + devm_free_irq(dev, irq, dev_id); > + vdpa_unsetup_irq(vdev, qid); > +} > +EXPORT_SYMBOL_GPL(vdpa_free_vq_irq); > + > static int vdpa_init(void) > { > return bus_register(&vdpa_bus); > diff --git a/include/linux/vdpa.h b/include/linux/vdpa.h > index 239db79..7d64d83 100644 > --- a/include/linux/vdpa.h > +++ b/include/linux/vdpa.h > @@ -220,17 +220,30 @@ struct vdpa_device *__vdpa_alloc_device(struct devic...
2020 Jul 13
0
[PATCH 4/7] vDPA: implement IRQ offloading helpers in vDPA core
...a_alloc_vq_irq); > + > +void vdpa_free_vq_irq(struct device *dev, struct vdpa_device *vdev, int irq, > + int qid, void *dev_id) > +{ > + devm_free_irq(dev, irq, dev_id); > + vdpa_unsetup_irq(vdev, qid); > +} > +EXPORT_SYMBOL_GPL(vdpa_free_vq_irq); > + > static int vdpa_init(void) > { > return bus_register(&vdpa_bus); > diff --git a/drivers/vhost/Kconfig b/drivers/vhost/Kconfig Let squash the vhost patch into patch 3. > index d3688c6..587fbae 100644 > --- a/drivers/vhost/Kconfig > +++ b/drivers/vhost/Kconfig > @@ -65,6 +65,7 @@ config...
2020 Feb 10
0
[PATCH V2 3/5] vDPA: introduce vDPA bus
...= dev_to_vdpa(d); + struct vdpa_driver *drv = drv_to_vdpa(vdev->dev.driver); + + if (drv && drv->remove) + drv->remove(vdev); + + return 0; +} + +static struct bus_type vdpa_bus = { + .name = "vdpa", + .probe = vdpa_dev_probe, + .remove = vdpa_dev_remove, +}; + +/** + * vdpa_init_device - initilaize a vDPA device + * This allows driver to some prepartion between after device is + * initialized but before vdpa_register_device() + * @vdev: the vdpa device to be initialized + * @parent: the paretn device + * @dma_dev: the actual device that is performing DMA + * @config: the b...
2020 Feb 20
0
[PATCH V3 3/5] vDPA: introduce vDPA bus
...nfig = config; + + dev_set_name(&vdev->dev, "vdpa%u", vdev->index); + + return vdev; + +err_ida: + kfree(vdev); +err: + return ERR_PTR(err); +} +EXPORT_SYMBOL_GPL(vdpa_alloc_device); + +/** + * vdpa_register_device - register a vDPA device + * Callers must have a succeed call of vdpa_init_device() before. + * @vdev: the vdpa device to be registered to vDPA bus + * + * Returns an error when fail to add to vDPA bus + */ +int vdpa_register_device(struct vdpa_device *vdev) +{ + return device_add(&vdev->dev); +} +EXPORT_SYMBOL_GPL(vdpa_register_device); + +/** + * vdpa_unregister_...
2020 Feb 10
9
[PATCH V2 0/5] vDPA support
...er (Michael, Jason, Ling Shan, Tiwei) - accept parent device and dma device when register vdpa device - coding style and compile fixes (Randy) - using vdpa_xxx instead of xxx_vdpa (Jason) - ove vDPA accessors to header and make it static inline (Jason) - split vdp_register_device() into two helpers vdpa_init_device() and vdpa_register_device() which allows intermediate step to be done (Jason) - warn on invalidate queue state when fail to creating virtqueue (Jason) - make to_virtio_vdpa_device() static (Jason) - use kmalloc/kfree instead of devres for virtio vdpa device (Jason) - avoid using cast in v...
2020 Feb 20
5
[PATCH V4 0/5] vDPA support
...er (Michael, Jason, Ling Shan, Tiwei) - accept parent device and dma device when register vdpa device - coding style and compile fixes (Randy) - using vdpa_xxx instead of xxx_vdpa (Jason) - ove vDPA accessors to header and make it static inline (Jason) - split vdp_register_device() into two helpers vdpa_init_device() and vdpa_register_device() which allows intermediate step to be done (Jason) - warn on invalidate queue state when fail to creating virtqueue (Jason) - make to_virtio_vdpa_device() static (Jason) - use kmalloc/kfree instead of devres for virtio vdpa device (Jason) - avoid using cast in v...
2020 Feb 20
9
[PATCH V3 0/5] vDPA support
...er (Michael, Jason, Ling Shan, Tiwei) - accept parent device and dma device when register vdpa device - coding style and compile fixes (Randy) - using vdpa_xxx instead of xxx_vdpa (Jason) - ove vDPA accessors to header and make it static inline (Jason) - split vdp_register_device() into two helpers vdpa_init_device() and vdpa_register_device() which allows intermediate step to be done (Jason) - warn on invalidate queue state when fail to creating virtqueue (Jason) - make to_virtio_vdpa_device() static (Jason) - use kmalloc/kfree instead of devres for virtio vdpa device (Jason) - avoid using cast in v...