Gitweb: http://git.kernel.org/linus/f3be07da531ceef1b51295e5becc9bc07670b671
Commit: f3be07da531ceef1b51295e5becc9bc07670b671
Parent: cd8c82e875c27ee0d8b59fb76bc12aa9db6a70c2
Author: Joerg Roedel <joerg.roedel@amd.com>
AuthorDate: Mon Nov 23 19:43:14 2009 +0100
Committer: Joerg Roedel <joerg.roedel@amd.com>
CommitDate: Fri Nov 27 14:17:08 2009 +0100
x86/amd-iommu: Remove iommu specific handling from dma_ops path
This patch finishes the removal of all iommu specific
handling code in the dma_ops path.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
---
arch/x86/kernel/amd_iommu.c | 28 +++++++++++-----------------
1 files changed, 11 insertions(+), 17 deletions(-)
diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c
index c04dcb7..2cd5800 100644
--- a/arch/x86/kernel/amd_iommu.c
+++ b/arch/x86/kernel/amd_iommu.c
@@ -1436,11 +1436,11 @@ static struct dma_ops_domain *find_protection_domain(u16 devid)
* in this function.
*/
static bool get_device_resources(struct device *dev,
- struct amd_iommu **iommu,
struct protection_domain **domain,
u16 *bdf)
{
struct dma_ops_domain *dma_dom;
+ struct amd_iommu *iommu;
struct pci_dev *pcidev;
u16 _bdf;
@@ -1450,21 +1450,21 @@ static bool get_device_resources(struct device *dev,
pcidev = to_pci_dev(dev);
_bdf = calc_devid(pcidev->bus->number, pcidev->devfn);
*bdf = amd_iommu_alias_table[_bdf];
- *iommu = amd_iommu_rlookup_table[*bdf];
+ iommu = amd_iommu_rlookup_table[*bdf];
*domain = domain_for_device(*bdf);
if (*domain == NULL) {
dma_dom = find_protection_domain(*bdf);
if (!dma_dom)
- dma_dom = (*iommu)->default_dom;
+ dma_dom = iommu->default_dom;
*domain = &dma_dom->domain;
- attach_device(*iommu, *domain, *bdf);
+ attach_device(iommu, *domain, *bdf);
DUMP_printk("Using protection domain %d for device %s\n",
(*domain)->id, dev_name(dev));
}
if (domain_for_device(_bdf) ...