summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorDavid Woodhouse <David.Woodhouse@intel.com>2014-03-09 16:29:55 -0700
committerDavid Woodhouse <David.Woodhouse@intel.com>2014-03-24 14:08:04 +0000
commitecb509ec2bacfe341530e56abf6bf3f20548bcd6 (patch)
tree882f696230e65e0767c8265b96b8b741606a3a35 /drivers
parent5913c9bf0efecfa869375af8b4619529d3464038 (diff)
iommu/vt-d: Remove pdev from iommu_no_mapping()
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/iommu/intel-iommu.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
index 2333f36f4866..0f5e6c911e85 100644
--- a/drivers/iommu/intel-iommu.c
+++ b/drivers/iommu/intel-iommu.c
@@ -2902,10 +2902,9 @@ static int iommu_dummy(struct device *dev)
return dev->archdata.iommu == DUMMY_DEVICE_DOMAIN_INFO;
}
-/* Check if the pdev needs to go through non-identity map and unmap process.*/
+/* Check if the dev needs to go through non-identity map and unmap process.*/
static int iommu_no_mapping(struct device *dev)
{
- struct pci_dev *pdev;
int found;
if (unlikely(!dev_is_pci(dev)))
@@ -2917,10 +2916,9 @@ static int iommu_no_mapping(struct device *dev)
if (!iommu_identity_mapping)
return 0;
- pdev = to_pci_dev(dev);
found = identity_mapping(dev);
if (found) {
- if (iommu_should_identity_map(&pdev->dev, 0))
+ if (iommu_should_identity_map(dev, 0))
return 1;
else {
/*
@@ -2929,7 +2927,7 @@ static int iommu_no_mapping(struct device *dev)
*/
domain_remove_one_dev_info(si_domain, dev);
printk(KERN_INFO "32bit %s uses non-identity mapping\n",
- pci_name(pdev));
+ dev_name(dev));
return 0;
}
} else {
@@ -2937,7 +2935,7 @@ static int iommu_no_mapping(struct device *dev)
* In case of a detached 64 bit DMA device from vm, the device
* is put into si_domain for identity mapping.
*/
- if (iommu_should_identity_map(&pdev->dev, 0)) {
+ if (iommu_should_identity_map(dev, 0)) {
int ret;
ret = domain_add_dev_info(si_domain, dev,
hw_pass_through ?
@@ -2945,7 +2943,7 @@ static int iommu_no_mapping(struct device *dev)
CONTEXT_TT_MULTI_LEVEL);
if (!ret) {
printk(KERN_INFO "64bit %s uses identity mapping\n",
- pci_name(pdev));
+ dev_name(dev));
return 1;
}
}