search for: coherent_dma_mask

Displaying 20 results from an estimated 102 matches for "coherent_dma_mask".

2019 Sep 08
0
[PATCH V6 4/5] iommu/dma-iommu: Use the dev->coherent_dma_mask
Use the dev->coherent_dma_mask when allocating in the dma-iommu ops api. Signed-off-by: Tom Murphy <murphyt7 at tcd.ie> Reviewed-by: Robin Murphy <robin.murphy at arm.com> Reviewed-by: Christoph Hellwig <hch at lst.de> --- drivers/iommu/dma-iommu.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletio...
2019 Jun 03
2
[PATCH v3 2/8] s390/cio: introduce DMA pools to cio
...why you use 31 bit here... > > @Halil, please let me know what comment you prefere here... > How about? /* * The physical addresses of some the dma structures that * can belong to a subchannel need to fit 31 bit width (examples ccw,). */ > > > >> + sch->dev.coherent_dma_mask = DMA_BIT_MASK(31); > >> + sch->dev.dma_mask = &sch->dev.coherent_dma_mask; > >> return sch; > >> > >> err: > >> @@ -899,6 +903,8 @@ static int __init setup_css(int nr) > >> dev_set_name(&css->device, "css%x&quot...
2019 Jun 03
2
[PATCH v3 2/8] s390/cio: introduce DMA pools to cio
...why you use 31 bit here... > > @Halil, please let me know what comment you prefere here... > How about? /* * The physical addresses of some the dma structures that * can belong to a subchannel need to fit 31 bit width (examples ccw,). */ > > > >> + sch->dev.coherent_dma_mask = DMA_BIT_MASK(31); > >> + sch->dev.dma_mask = &sch->dev.coherent_dma_mask; > >> return sch; > >> > >> err: > >> @@ -899,6 +903,8 @@ static int __init setup_css(int nr) > >> dev_set_name(&css->device, "css%x&quot...
2019 May 25
1
[PATCH v2 3/8] s390/cio: add basic protected virtualization support
...GFP_KERNEL | GFP_DMA); > - if (cdev->private) > - return cdev; > - } > + if (!cdev) > + goto err_cdev; > + cdev->private = kzalloc(sizeof(struct ccw_device_private), > + GFP_KERNEL | GFP_DMA); > + if (!cdev->private) > + goto err_priv; > + cdev->dev.coherent_dma_mask = sch->dev.coherent_dma_mask; > + cdev->dev.dma_mask = &cdev->dev.coherent_dma_mask; > + dma_pool = cio_gp_dma_create(&cdev->dev, 1); This can return NULL. gen_pool_alloc will panic in this case. [...] > +err_dma_area: > + kfree(io_priv); Indentation. > +err_...
2020 Jul 10
1
[PATCH V6 4/5] iommu/dma-iommu: Use the dev->coherent_dma_mask
Btw, what is the current state of converting intel-iommu to the dma-iommu code?
2019 May 08
4
[PATCH 05/10] s390/cio: introduce DMA pools to cio
...ruct subchannel_id schid, > INIT_WORK(&sch->todo_work, css_sch_todo); > sch->dev.release = &css_subchannel_release; > device_initialize(&sch->dev); > + sch->dma_mask = css_dev_dma_mask; > + sch->dev.dma_mask = &sch->dma_mask; > + sch->dev.coherent_dma_mask = sch->dma_mask; Could we do: sch->dev.dma_mask = &sch->dev.coherent_dma_mask; sch->dev.coherent_dma_mask = css_dev_dma_mask; ? > +#define POOL_INIT_PAGES 1 > +static struct gen_pool *cio_dma_pool; > +/* Currently cio supports only a single css */ > +#define CIO_DMA...
2019 May 08
4
[PATCH 05/10] s390/cio: introduce DMA pools to cio
...ruct subchannel_id schid, > INIT_WORK(&sch->todo_work, css_sch_todo); > sch->dev.release = &css_subchannel_release; > device_initialize(&sch->dev); > + sch->dma_mask = css_dev_dma_mask; > + sch->dev.dma_mask = &sch->dma_mask; > + sch->dev.coherent_dma_mask = sch->dma_mask; Could we do: sch->dev.dma_mask = &sch->dev.coherent_dma_mask; sch->dev.coherent_dma_mask = css_dev_dma_mask; ? > +#define POOL_INIT_PAGES 1 > +static struct gen_pool *cio_dma_pool; > +/* Currently cio supports only a single css */ > +#define CIO_DMA...
2019 Jun 03
5
[PATCH v3 2/8] s390/cio: introduce DMA pools to cio
...hannel *css_alloc_subchannel(struct subchannel_id schid, > INIT_WORK(&sch->todo_work, css_sch_todo); > sch->dev.release = &css_subchannel_release; > device_initialize(&sch->dev); It might be helpful to add a comment why you use 31 bit here... > + sch->dev.coherent_dma_mask = DMA_BIT_MASK(31); > + sch->dev.dma_mask = &sch->dev.coherent_dma_mask; > return sch; > > err: > @@ -899,6 +903,8 @@ static int __init setup_css(int nr) > dev_set_name(&css->device, "css%x", nr); > css->device.groups = cssdev_attr_groups;...
2019 Jun 03
5
[PATCH v3 2/8] s390/cio: introduce DMA pools to cio
...hannel *css_alloc_subchannel(struct subchannel_id schid, > INIT_WORK(&sch->todo_work, css_sch_todo); > sch->dev.release = &css_subchannel_release; > device_initialize(&sch->dev); It might be helpful to add a comment why you use 31 bit here... > + sch->dev.coherent_dma_mask = DMA_BIT_MASK(31); > + sch->dev.dma_mask = &sch->dev.coherent_dma_mask; > return sch; > > err: > @@ -899,6 +903,8 @@ static int __init setup_css(int nr) > dev_set_name(&css->device, "css%x", nr); > css->device.groups = cssdev_attr_groups;...
2019 Jun 03
0
[PATCH v3 2/8] s390/cio: introduce DMA pools to cio
..._work, css_sch_todo); >> sch->dev.release = &css_subchannel_release; >> device_initialize(&sch->dev); > > It might be helpful to add a comment why you use 31 bit here... @Halil, please let me know what comment you prefere here... > >> + sch->dev.coherent_dma_mask = DMA_BIT_MASK(31); >> + sch->dev.dma_mask = &sch->dev.coherent_dma_mask; >> return sch; >> >> err: >> @@ -899,6 +903,8 @@ static int __init setup_css(int nr) >> dev_set_name(&css->device, "css%x", nr); >> css->de...
2019 May 23
0
[PATCH v2 2/8] s390/cio: introduce DMA pools to cio
...nclude <asm/isc.h> #include <asm/crw.h> @@ -224,6 +226,8 @@ struct subchannel *css_alloc_subchannel(struct subchannel_id schid, INIT_WORK(&sch->todo_work, css_sch_todo); sch->dev.release = &css_subchannel_release; device_initialize(&sch->dev); + sch->dev.coherent_dma_mask = DMA_BIT_MASK(31); + sch->dev.dma_mask = &sch->dev.coherent_dma_mask; return sch; err: @@ -899,6 +903,8 @@ static int __init setup_css(int nr) dev_set_name(&css->device, "css%x", nr); css->device.groups = cssdev_attr_groups; css->device.release = channel...
2019 May 29
0
[PATCH v3 2/8] s390/cio: introduce DMA pools to cio
...nclude <asm/isc.h> #include <asm/crw.h> @@ -224,6 +226,8 @@ struct subchannel *css_alloc_subchannel(struct subchannel_id schid, INIT_WORK(&sch->todo_work, css_sch_todo); sch->dev.release = &css_subchannel_release; device_initialize(&sch->dev); + sch->dev.coherent_dma_mask = DMA_BIT_MASK(31); + sch->dev.dma_mask = &sch->dev.coherent_dma_mask; return sch; err: @@ -899,6 +903,8 @@ static int __init setup_css(int nr) dev_set_name(&css->device, "css%x", nr); css->device.groups = cssdev_attr_groups; css->device.release = channel...
2019 Jun 06
0
[PATCH v4 2/8] s390/cio: introduce DMA pools to cio
...d, INIT_WORK(&sch->todo_work, css_sch_todo); sch->dev.release = &css_subchannel_release; device_initialize(&sch->dev); + /* + * The physical addresses of some the dma structures that can + * belong to a subchannel need to fit 31 bit width (e.g. ccw). + */ + sch->dev.coherent_dma_mask = DMA_BIT_MASK(31); + sch->dev.dma_mask = &sch->dev.coherent_dma_mask; return sch; err: @@ -899,6 +907,13 @@ static int __init setup_css(int nr) dev_set_name(&css->device, "css%x", nr); css->device.groups = cssdev_attr_groups; css->device.release = channe...
2019 Jun 12
0
[PATCH v5 2/8] s390/cio: introduce DMA pools to cio
...d, INIT_WORK(&sch->todo_work, css_sch_todo); sch->dev.release = &css_subchannel_release; device_initialize(&sch->dev); + /* + * The physical addresses of some the dma structures that can + * belong to a subchannel need to fit 31 bit width (e.g. ccw). + */ + sch->dev.coherent_dma_mask = DMA_BIT_MASK(31); + sch->dev.dma_mask = &sch->dev.coherent_dma_mask; return sch; err: @@ -899,6 +907,13 @@ static int __init setup_css(int nr) dev_set_name(&css->device, "css%x", nr); css->device.groups = cssdev_attr_groups; css->device.release = channe...
2013 Dec 10
0
[RFC] dma-mapping: dma_alloc_coherent_mask return dma_addr_t
When running a 32bit kernel there are still some pci devices capable of 64bit addressing (eg. sound/pci/hda/hda_intel.c) If these drivers are setting: dev->coherent_dma_mask = 0xFFFFFFFFFFFFFFFF why dma_alloc_coherent_mask is returning unsigned long instead of dma_addr_t resulting in truncation of the dma_mask to 32bit if running a 32bit kernel? There are some examples where the dma_alloc_coherent running 32bit kernel can return a machine address bigger than 32bit....
2019 Jun 03
0
[PATCH v3 2/8] s390/cio: introduce DMA pools to cio
...ere here... > > > > How about? > > /* > * The physical addresses of some the dma structures that > * can belong to a subchannel need to fit 31 bit width (examples ccw,). > */ "e.g. ccw"? > > > > > > > >> + sch->dev.coherent_dma_mask = DMA_BIT_MASK(31); > > >> + sch->dev.dma_mask = &sch->dev.coherent_dma_mask; > > >> return sch; > > >> > > >> err: > > >> @@ -899,6 +903,8 @@ static int __init setup_css(int nr) > > >> dev_set_name(&cs...
2020 Aug 10
1
[PATCH] vdpa_sim: init iommu lock
...dpa_sim.c +++ b/drivers/vdpa/vdpa_sim/vdpa_sim.c @@ -358,6 +358,7 @@ static struct vdpasim *vdpasim_create(void) INIT_WORK(&vdpasim->work, vdpasim_work); spin_lock_init(&vdpasim->lock); + spin_lock_init(&vdpasim->iommu_lock); dev = &vdpasim->vdpa.dev; dev->coherent_dma_mask = DMA_BIT_MASK(64); -- MST
2018 Jul 30
1
[RFC 2/4] virtio: Override device's DMA OPS with virtio_direct_dma_ops selectively
> > + > > + if (xen_domain()) > > + goto skip_override; > > + > > + if (virtio_has_iommu_quirk(dev)) > > + set_dma_ops(dev->dev.parent, &virtio_direct_dma_ops); > > + > > + skip_override: > > + > > I prefer normal if scoping as opposed to goto spaghetti pls. > Better yet move vring_use_dma_api here and use it. > Less of a
2020 Feb 11
1
[PATCH V2 5/5] vdpasim: vDPA device simulator
...) The subsystem owns the release and does the kfree and other cleanup like releasing the IDA. > + vringh_set_iotlb(&vdpasim->vqs[0].vring, vdpasim->iommu); > + vringh_set_iotlb(&vdpasim->vqs[1].vring, vdpasim->iommu); > + > + dev = &vdpa->dev; > + dev->coherent_dma_mask = DMA_BIT_MASK(64); > + set_dma_ops(dev, &vdpasim_dma_ops); > + > + ret = vdpa_init_device(vdpa, &vdpasim_dev->dev, dev, > + &vdpasim_net_config_ops); > + if (ret) > + goto err_init; > + > + ret = vdpa_register_device(vdpa); > + if (ret) > + g...
2019 Jun 13
1
[PATCH v5 0/8] s390: virtio: support protected virtualization
...code move (patch 7) > > * add more r-b's > > > > > > > > v3 --> v4 > > * fixed cleanup in css_bus_init() (Connie) > > * made cio.h include genalloc.h instead of a forward declaration > > (Connie) > > * added comments about dma_mask/coherent_dma_mask values (Connie) > > * fixed error handling in virtio_ccw_init() (Connie) > > * got rid of the *vc_dma* wrappers (Connie) > > * added some Reviewed-bys > > * rebased on top of current master, no changes were necessary > > > > v2 --> v3: > > * patch 2/8 &...