Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1439349
| Path | csiph.com!feeder.erje.net!1.us.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!news.unit0.net!news.panservice.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | Joerg Roedel <joro@8bytes.org> |
| Newsgroups | linux.kernel |
| Subject | [PATCH 17/20] iommu/amd: Use dev_data->domain in get_domain() |
| Date | Fri, 08 Jul 2016 13:50:02 +0200 |
| Message-ID | <rSCsa-4e3-67@gated-at.bofh.it> (permalink) |
| References | <rSCs9-4e3-3@gated-at.bofh.it> |
| Dkim-Signature | v=1; a=rsa-sha256; c=simple/simple; d=8bytes.org; s=mail-1; t=1467978325; bh=vqUkFwhZd9eooEkk2lrrv8QmOvl9Rg9Fnw8kAVTovPE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TbYU2mXj2Og+JJeSml/nZfzHfOmNzuZWdBYZB7VO1+xV5+794ooLahWQe8280LAkd Rla9R6poJrEbJJdvoMEdCjhgkrnbTRA2nMniWMPqeKoQS+MHRhl48PD4D0IYlaD3Fk 8YnOvr0bngoCyif5e52+rKEp7LvQexUCWlCGQnYLyhJR5CBKZyheRKWIWw1VSz5xPy /2gVj6ctVQa36osJ4crdTx7bHV05kVJwp5HyGGwncAuNs41yvTU/VL+N4MmGYV8/3r BlUK1jwUq9XfSryiPkjM72bjd1raCBKwkbLBa6Rs8zYdC0oRyqY8d6aEyflOKNElBq P2IQzoJzYR13w== |
| X-Mailer | git-send-email 1.9.1 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 34 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | linux-kernel@vger.kernel.org, Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>, Vincent.Wan@amd.com, Joerg Roedel <jroedel@suse.de> |
| X-Original-Date | Fri, 8 Jul 2016 13:45:08 +0200 |
| X-Original-Message-ID | <1467978311-28322-18-git-send-email-joro@8bytes.org> |
| X-Original-References | <1467978311-28322-1-git-send-email-joro@8bytes.org> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1439349 |
Show key headers only | View raw
From: Joerg Roedel <jroedel@suse.de>
Using the cached value is much more efficient than calling
into the IOMMU core code.
Signed-off-by: Joerg Roedel <jroedel@suse.de>
---
drivers/iommu/amd_iommu.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index e5f8e7f..4b17148 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -2223,16 +2223,11 @@ static void queue_add(struct dma_ops_domain *dma_dom,
static struct protection_domain *get_domain(struct device *dev)
{
struct protection_domain *domain;
- struct iommu_domain *io_domain;
if (!check_device(dev))
return ERR_PTR(-EINVAL);
- io_domain = iommu_get_domain_for_dev(dev);
- if (!io_domain)
- return NULL;
-
- domain = to_pdomain(io_domain);
+ domain = get_dev_data(dev)->domain;
if (!dma_ops_domain(domain))
return ERR_PTR(-EBUSY);
--
1.9.1
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH 17/20] iommu/amd: Use dev_data->domain in get_domain() Joerg Roedel <joro@8bytes.org> - 2016-07-08 13:50 +0200
csiph-web