lkml.org 
[lkml]   [2019]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] iommu/amd: Implement dma_[un]map_resource()
On Tue, Oct 08, 2019 at 04:18:35PM -0600, Logan Gunthorpe wrote:
> From: Kit Chow <kchow@gigaio.com>
>
> Currently the Intel IOMMU uses the default dma_[un]map_resource()

s/Intel/AMD/ ?

> +static dma_addr_t map_resource(struct device *dev, phys_addr_t paddr,
> + size_t size, enum dma_data_direction dir, unsigned long attrs)
> +{
> + struct protection_domain *domain;
> + struct dma_ops_domain *dma_dom;
> +
> + domain = get_domain(dev);
> + if (PTR_ERR(domain) == -EINVAL)
> + return (dma_addr_t)paddr;

I thought that case can't happen anymore?

Also note that Joerg just applied the patch to convert the AMD iommu
driver to use the dma-iommu ops. Can you test that series and check
it does the right thing for your use case? From looking at the code
I think it should.

\
 
 \ /
  Last update: 2019-10-09 08:58    [W:0.049 / U:38.292 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site