Re: [PATCH 13/16] nvme-pci: Convert to using dma_map_sg_p2pdma for p2pdma pages

2021-05-03 Thread John Hubbard
On 5/3/21 10:19 AM, Logan Gunthorpe wrote: ... + nr_mapped = dma_map_sg_p2pdma_attrs(dev->dev, iod->sg, iod->nents, +rq_dma_dir(req), DMA_ATTR_NO_WARN); + if (nr_mapped < 0) { + if (nr_mapped != -ENOMEM) + ret = B

Re: [PATCH 13/16] nvme-pci: Convert to using dma_map_sg_p2pdma for p2pdma pages

2021-05-03 Thread Logan Gunthorpe
On 2021-05-02 7:34 p.m., John Hubbard wrote: >> if (iod->npages == 0) >> dma_pool_free(dev->prp_small_pool, nvme_pci_iod_list(req)[0], >>iod->first_dma); >> @@ -868,14 +857,13 @@ static blk_status_t nvme_map_data(struct nvme_dev >> *dev, struct requ

Re: [PATCH 13/16] nvme-pci: Convert to using dma_map_sg_p2pdma for p2pdma pages

2021-05-02 Thread John Hubbard
On 4/8/21 10:01 AM, Logan Gunthorpe wrote: Convert to using dma_map_sg_p2pdma() for PCI p2pdma pages. This should be equivalent but allows for heterogeneous scatterlists with both P2PDMA and regular pages. However, P2PDMA support will be slightly more restricted (only dma-direct and dma-iommu ar

[PATCH 13/16] nvme-pci: Convert to using dma_map_sg_p2pdma for p2pdma pages

2021-04-08 Thread Logan Gunthorpe
Convert to using dma_map_sg_p2pdma() for PCI p2pdma pages. This should be equivalent but allows for heterogeneous scatterlists with both P2PDMA and regular pages. However, P2PDMA support will be slightly more restricted (only dma-direct and dma-iommu are currently supported). Signed-off-by: Logan