Re: implement generic dma_map_ops for IOMMUs
Any chance to get a review on this one? On Mon, Jan 14, 2019 at 10:41:40AM +0100, Christoph Hellwig wrote: > Hi Robin, > > please take a look at this series, which implements a completely generic > set of dma_map_ops for IOMMU drivers. This is done by taking the > existing arm64 code, moving it to drivers/iommu and then massaging it > so that it can also work for architectures with DMA remapping. This > should help future ports to support IOMMUs more easily, and also allow > to remove various custom IOMMU dma_map_ops implementations, like Tom > was planning to for the AMD one. > > A git tree is also available at: > > git://git.infradead.org/users/hch/misc.git dma-iommu-ops > > Gitweb: > > > http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/dma-iommu-ops > ___ > iommu mailing list > iommu@lists.linux-foundation.org > https://lists.linuxfoundation.org/mailman/listinfo/iommu ---end quoted text--- ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: use generic DMA mapping code in powerpc V4
On Sun, Jan 27, 2019 at 02:13:09PM +0100, Christian Zigotzky wrote: > Christoph, > > What shall I do next? I'll need to figure out what went wrong with the new zone selection on powerpc and give you another branch to test. ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH 6/9] iommu/dma-iommu.c: Convert to use vm_insert_range
On Fri, Jan 11, 2019 at 8:37 PM Souptick Joarder wrote: > > Convert to use vm_insert_range() to map range of kernel > memory to user vma. > > Signed-off-by: Souptick Joarder Any comment on this patch ? > --- > drivers/iommu/dma-iommu.c | 12 +--- > 1 file changed, 1 insertion(+), 11 deletions(-) > > diff --git a/drivers/iommu/dma-iommu.c b/drivers/iommu/dma-iommu.c > index d1b0475..802de67 100644 > --- a/drivers/iommu/dma-iommu.c > +++ b/drivers/iommu/dma-iommu.c > @@ -622,17 +622,7 @@ struct page **iommu_dma_alloc(struct device *dev, size_t > size, gfp_t gfp, > > int iommu_dma_mmap(struct page **pages, size_t size, struct vm_area_struct > *vma) > { > - unsigned long uaddr = vma->vm_start; > - unsigned int i, count = PAGE_ALIGN(size) >> PAGE_SHIFT; > - int ret = -ENXIO; > - > - for (i = vma->vm_pgoff; i < count && uaddr < vma->vm_end; i++) { > - ret = vm_insert_page(vma, uaddr, pages[i]); > - if (ret) > - break; > - uaddr += PAGE_SIZE; > - } > - return ret; > + return vm_insert_range(vma, pages, PAGE_ALIGN(size) >> PAGE_SHIFT); > } > > static dma_addr_t __iommu_dma_map(struct device *dev, phys_addr_t phys, > -- > 1.9.1 > ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [GIT PULL] dma-mapping fix for 5.0-rc
The pull request you sent on Sun, 27 Jan 2019 10:27:21 +0100: > git://git.infradead.org/users/hch/dma-mapping.git tags/dma-mapping-5.0-2 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/c180f1b04be01d025aa1e6e53e1a8b6626bd90c4 Thank you! -- Deet-doot-dot, I am a bot. https://korg.wiki.kernel.org/userdoc/prtracker ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: use generic DMA mapping code in powerpc V4
Christoph, What shall I do next? Cheers, Christian On 25 January 2019 at 2:37PM, Christian Zigotzky wrote: Next step just with the first patch: 5c532d07c2f3c3972104de505d06b8d85f403f06 (use powerpc zone selection) git clone git://git.infradead.org/users/hch/misc.git -b powerpc-dma.6-debug a git checkout 5c532d07c2f3c3972104de505d06b8d85f403f06 Link to the Git: http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/powerpc-dma.6-debug Results: X5000: The kernel detects the SATA hard disk drive and boots without any problems. X1000: The kernel boots and the P.A. Semi Ethernet works! -- Christian On 23 January 2019 at 3:34PM, Christian Zigotzky wrote: Hi Christoph, I also compiled a kernel (zImage) for the X1000 from your Git 'powerpc-dma.6-debug' (both patches) today. It boots and the P.A. Semi Ethernet works! I will test just the first patch tomorrow. Thanks, Christian On 21 January 2019 at 3:38PM, Christian Zigotzky wrote: Hello Christoph, Thanks for your reply. I successfully compiled a kernel (uImage) for the X5000 from your Git 'powerpc-dma.6-debug' (both patches) today. It detects the SATA hard disk drive and boots without any problems. ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
[GIT PULL] dma-mapping fix for 5.0-rc
Hi Linus, please pull the fix below, which fixed the xen swiotlb cache flusing on arm64. The following changes since commit 333478a7eb21245880c89aad166ad08478cc577d: Merge branch 'for-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux (2019-01-23 16:23:41 +1300) are available in the Git repository at: git://git.infradead.org/users/hch/dma-mapping.git tags/dma-mapping-5.0-2 for you to fetch changes up to 60d8cd572f655aac6107a2330dced004ad1fe3d7: arm64/xen: fix xen-swiotlb cache flushing (2019-01-23 22:14:56 +0100) Fix a xen-swiotlb regression on arm64 Christoph Hellwig (1): arm64/xen: fix xen-swiotlb cache flushing arch/arm/include/asm/xen/page-coherent.h | 94 + arch/arm64/include/asm/device.h| 3 - arch/arm64/include/asm/xen/page-coherent.h | 76 +++ arch/arm64/mm/dma-mapping.c| 4 +- drivers/xen/swiotlb-xen.c | 4 +- include/xen/arm/page-coherent.h| 97 +- 6 files changed, 176 insertions(+), 102 deletions(-) ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu