search for: dma_pool

Displaying 20 results from an estimated 36 matches for "dma_pool".

2019 May 16
3
[PATCH 05/10] s390/cio: introduce DMA pools to cio
On Sun, 12 May 2019, Halil Pasic wrote: > I've also got code that deals with AIRQ_IV_CACHELINE by turning the > kmem_cache into a dma_pool. > > Cornelia, Sebastian which approach do you prefer: > 1) get rid of cio_dma_pool and AIRQ_IV_CACHELINE, and waste a page per > vector, or > 2) go with the approach taken by the patch below? We only have a couple of users for airq_iv: virtio_ccw.c: 2K bits pci with floating IRQ...
2019 May 16
3
[PATCH 05/10] s390/cio: introduce DMA pools to cio
On Sun, 12 May 2019, Halil Pasic wrote: > I've also got code that deals with AIRQ_IV_CACHELINE by turning the > kmem_cache into a dma_pool. > > Cornelia, Sebastian which approach do you prefer: > 1) get rid of cio_dma_pool and AIRQ_IV_CACHELINE, and waste a page per > vector, or > 2) go with the approach taken by the patch below? We only have a couple of users for airq_iv: virtio_ccw.c: 2K bits pci with floating IRQ...
2019 May 22
1
[PATCH 05/10] s390/cio: introduce DMA pools to cio
...the summary bit vector) > > > > I guess this is the same. > > > > > The options are: > > * page allocations for everything > > Worst case we need 20 + #max_pci_dev pages. At the moment we allocate > from ZONE_DMA (!) and waste a lot. > > > * dma_pool for AIRQ_IV_CACHELINE ,gen_pool for others > > I prefer this. Explanation follows. > > > * dma_pool for everything > > > > Less waste by factor factor 16. > > > I think we should do option 3 and use a dma_pool with cachesize > > alignment for everythin...
2019 May 20
0
[PATCH 05/10] s390/cio: introduce DMA pools to cio
On Thu, 16 May 2019 15:59:22 +0200 (CEST) Sebastian Ott <sebott at linux.ibm.com> wrote: > On Sun, 12 May 2019, Halil Pasic wrote: > > I've also got code that deals with AIRQ_IV_CACHELINE by turning the > > kmem_cache into a dma_pool. > > > > Cornelia, Sebastian which approach do you prefer: > > 1) get rid of cio_dma_pool and AIRQ_IV_CACHELINE, and waste a page per > > vector, or > > 2) go with the approach taken by the patch below? > > We only have a couple of users for airq_iv: > >...
2019 May 25
1
[PATCH v2 3/8] s390/cio: add basic protected virtualization support
On Thu, 23 May 2019, Michael Mueller wrote: > static struct ccw_device * io_subchannel_allocate_dev(struct subchannel *sch) > { > struct ccw_device *cdev; > + struct gen_pool *dma_pool; > > cdev = kzalloc(sizeof(*cdev), GFP_KERNEL); > - if (cdev) { > - cdev->private = kzalloc(sizeof(struct ccw_device_private), > - GFP_KERNEL | GFP_DMA); > - if (cdev->private) > - return cdev; > - } > + if (!cdev) > + goto err_cdev; > + cdev-&gt...
2019 May 29
0
[PATCH v3 3/8] s390/cio: add basic protected virtualization support
...tat.h> #include <linux/sched/signal.h> +#include <linux/dma-mapping.h> #include <asm/ccwdev.h> #include <asm/cio.h> @@ -687,6 +688,9 @@ ccw_device_release(struct device *dev) struct ccw_device *cdev; cdev = to_ccwdev(dev); + cio_gp_dma_free(cdev->private->dma_pool, cdev->private->dma_area, + sizeof(*cdev->private->dma_area)); + cio_gp_dma_destroy(cdev->private->dma_pool, &cdev->dev); /* Release reference of parent subchannel. */ put_device(cdev->dev.parent); kfree(cdev->private); @@ -696,15 +700,33 @@ ccw_device_release...
2019 Jun 12
0
[PATCH v5 3/8] s390/cio: add basic protected virtualization support
...tat.h> #include <linux/sched/signal.h> +#include <linux/dma-mapping.h> #include <asm/ccwdev.h> #include <asm/cio.h> @@ -687,6 +688,9 @@ ccw_device_release(struct device *dev) struct ccw_device *cdev; cdev = to_ccwdev(dev); + cio_gp_dma_free(cdev->private->dma_pool, cdev->private->dma_area, + sizeof(*cdev->private->dma_area)); + cio_gp_dma_destroy(cdev->private->dma_pool, &cdev->dev); /* Release reference of parent subchannel. */ put_device(cdev->dev.parent); kfree(cdev->private); @@ -696,15 +700,33 @@ ccw_device_release...
2020 Aug 19
0
[PATCH 28/28] nvme-pci: use dma_alloc_pages backed dmapools
...s(-) diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index a33adab62acbaf..fb34dbcb973673 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -114,8 +114,8 @@ struct nvme_dev { struct blk_mq_tag_set admin_tagset; u32 __iomem *dbs; struct device *dev; - struct dma_pool *prp_page_pool; - struct dma_pool *prp_small_pool; + struct dma_pool prp_page_pool; + struct dma_pool prp_small_pool; unsigned online_queues; unsigned max_qid; unsigned io_queues[HCTX_MAX_TYPES]; @@ -536,7 +536,7 @@ static void nvme_unmap_data(struct nvme_dev *dev, struct request *req)...
2019 Apr 26
0
[PATCH 06/10] s390/cio: add basic protected virtualization support
...tat.h> #include <linux/sched/signal.h> +#include <linux/dma-mapping.h> #include <asm/ccwdev.h> #include <asm/cio.h> @@ -687,6 +688,9 @@ ccw_device_release(struct device *dev) struct ccw_device *cdev; cdev = to_ccwdev(dev); + cio_gp_dma_free(cdev->private->dma_pool, cdev->private->dma_area, + sizeof(*cdev->private->dma_area)); + cio_gp_dma_destroy(cdev->private->dma_pool, &cdev->dev); /* Release reference of parent subchannel. */ put_device(cdev->dev.parent); kfree(cdev->private); @@ -696,15 +700,31 @@ ccw_device_release...
2019 May 23
0
[PATCH v2 3/8] s390/cio: add basic protected virtualization support
...tat.h> #include <linux/sched/signal.h> +#include <linux/dma-mapping.h> #include <asm/ccwdev.h> #include <asm/cio.h> @@ -687,6 +688,9 @@ ccw_device_release(struct device *dev) struct ccw_device *cdev; cdev = to_ccwdev(dev); + cio_gp_dma_free(cdev->private->dma_pool, cdev->private->dma_area, + sizeof(*cdev->private->dma_area)); + cio_gp_dma_destroy(cdev->private->dma_pool, &cdev->dev); /* Release reference of parent subchannel. */ put_device(cdev->dev.parent); kfree(cdev->private); @@ -696,15 +700,30 @@ ccw_device_release...
2019 May 10
3
[PATCH 05/10] s390/cio: introduce DMA pools to cio
...t; wrote: > > > > > > > @@ -1063,6 +1163,7 @@ static int __init css_bus_init(void) > > > > > unregister_reboot_notifier(&css_reboot_notifier); > > > > > goto out_unregister; > > > > > } > > > > > + cio_dma_pool_init(); > > > > > > > > This is too late for early devices (ccw console!). > > > > > > You have already raised concern about this last time (thanks). I think, > > > I've addressed this issue: tje cio_dma_pool is only used by the air...
2019 May 10
3
[PATCH 05/10] s390/cio: introduce DMA pools to cio
...t; wrote: > > > > > > > @@ -1063,6 +1163,7 @@ static int __init css_bus_init(void) > > > > > unregister_reboot_notifier(&css_reboot_notifier); > > > > > goto out_unregister; > > > > > } > > > > > + cio_dma_pool_init(); > > > > > > > > This is too late for early devices (ccw console!). > > > > > > You have already raised concern about this last time (thanks). I think, > > > I've addressed this issue: tje cio_dma_pool is only used by the air...
2019 Jun 12
21
[PATCH v5 0/8] s390: virtio: support protected virtualization
...oing to test this code with (so virtio actually uses the DMA API). @Sebastian: I kept your r-b on patch 2 "s390/cio: introduce DMA pools to cio" despite the small changes pointed out below. Please do complain if it ain't OK for you! Change log ========== v4 --> v5: * work around dma_pool API not tolerating NULL dma pool (patch 4) * make the genpool based dma pools API tolerate NULL genpool (patch 2) * fix typo (patch 2) * fix unintended 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 f...
2019 Jun 12
21
[PATCH v5 0/8] s390: virtio: support protected virtualization
...oing to test this code with (so virtio actually uses the DMA API). @Sebastian: I kept your r-b on patch 2 "s390/cio: introduce DMA pools to cio" despite the small changes pointed out below. Please do complain if it ain't OK for you! Change log ========== v4 --> v5: * work around dma_pool API not tolerating NULL dma pool (patch 4) * make the genpool based dma pools API tolerate NULL genpool (patch 2) * fix typo (patch 2) * fix unintended 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 f...
2019 Jun 13
1
[PATCH v5 0/8] s390: virtio: support protected virtualization
...I kept your r-b on patch 2 "s390/cio: introduce DMA pools to > > cio" despite the small changes pointed out below. Please do complain if > > it ain't OK for you! > > > > Change log > > ========== > > > > v4 --> v5: > > * work around dma_pool API not tolerating NULL dma pool (patch 4) > > * make the genpool based dma pools API tolerate NULL genpool (patch 2) > > * fix typo (patch 2) > > * fix unintended code move (patch 7) > > * add more r-b's > > > > > > > > v3 --> v4 > >...
2019 May 23
18
[PATCH v2 0/8] s390: virtio: support protected virtualization
..."virtio/s390: enable packed ring" went already upstream * Made dev.dma_mask point to dev.coherent_dma_mask for css, subchannel and ccw devices. * While rebasing 's390/airq: use DMA memory for adapter interrupts' the newly introduced kmem_cache was replaced with an equivalent dma_pool; the kalloc() allocations are now replaced with cio_dma_zalloc() allocations to avoid wasting almost a full page. * Made virtio-ccw use the new AIRQ_IV_CACHELINE flag. * fixed all remaining checkpatch issues RFC --> v1: * Fixed bugs found by Connie (may_reduce and handling reduced, warning...
2020 Aug 19
39
a saner API for allocating DMA addressable pages
Hi all, this series replaced the DMA_ATTR_NON_CONSISTENT flag to dma_alloc_attrs with a separate new dma_alloc_pages API, which is available on all platforms. In addition to cleaning up the convoluted code path, this ensures that other drivers that have asked for better support for non-coherent DMA to pages with incurring bounce buffering over can finally be properly supported. I'm still a
2019 Jun 06
15
[PATCH v4 0/8] s390: virtio: support protected virtualization
...ie) * 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 potential cio_dma_pool_init() returning NULL issue fixed potential cio_gp_dma_create() returning NULL issue fixed warning issues with doc type comments fixed unused define statement removed * patch 3/8 potential cio_gp_dma_create() returning NULL issue fixed whitespace issue fixed warning issues...
2019 Jun 06
15
[PATCH v4 0/8] s390: virtio: support protected virtualization
...ie) * 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 potential cio_dma_pool_init() returning NULL issue fixed potential cio_gp_dma_create() returning NULL issue fixed warning issues with doc type comments fixed unused define statement removed * patch 3/8 potential cio_gp_dma_create() returning NULL issue fixed whitespace issue fixed warning issues...
2019 May 29
16
[PATCH v3 0/8] s390: virtio: support protected virtualization
...names to more abstract ones. I did not put much thought into that at the current stage. * Testing: Please use iommu_platform=on for any virtio devices you are going to test this code with (so virtio actually uses the DMA API). Change log ========== v2 --> v3: * patch 2/8 potential cio_dma_pool_init() returning NULL issue fixed potential cio_gp_dma_create() returning NULL issue fixed warning issues with doc type comments fixed unused define statement removed * patch 3/8 potential cio_gp_dma_create() returning NULL issue fixed whitespace issue fixed warning issues...