diff options
author | Joerg Roedel <jroedel@suse.de> | 2015-07-23 10:20:14 -0400 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2015-08-12 10:23:35 -0400 |
commit | 2452d9db1218fdb1c29afb921838c323987f5799 (patch) | |
tree | b5301d8babe6f29b3ee4d175d67923fe6b9c1fb4 | |
parent | e6de0f8dfcd0395efee874db97536531555d91af (diff) |
iommu/vt-d: Rename iommu_detach_dependent_devices()
Rename this function and the ones further down its
call-chain to domain_context_clear_*. In particular this
means:
iommu_detach_dependent_devices -> domain_context_clear
iommu_detach_dev_cb -> domain_context_clear_one_cb
iommu_detach_dev -> domain_context_clear_one
These names match a lot better with its
domain_context_mapping counterparts.
Signed-off-by: Joerg Roedel <jroedel@suse.de>
-rw-r--r-- | drivers/iommu/intel-iommu.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index faa95d15fe0a..62c27eff549d 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c | |||
@@ -474,8 +474,8 @@ static void domain_exit(struct dmar_domain *domain); | |||
474 | static void domain_remove_dev_info(struct dmar_domain *domain); | 474 | static void domain_remove_dev_info(struct dmar_domain *domain); |
475 | static void dmar_remove_one_dev_info(struct dmar_domain *domain, | 475 | static void dmar_remove_one_dev_info(struct dmar_domain *domain, |
476 | struct device *dev); | 476 | struct device *dev); |
477 | static void iommu_detach_dependent_devices(struct intel_iommu *iommu, | 477 | static void domain_context_clear(struct intel_iommu *iommu, |
478 | struct device *dev); | 478 | struct device *dev); |
479 | static int domain_detach_iommu(struct dmar_domain *domain, | 479 | static int domain_detach_iommu(struct dmar_domain *domain, |
480 | struct intel_iommu *iommu); | 480 | struct intel_iommu *iommu); |
481 | 481 | ||
@@ -2230,7 +2230,7 @@ static inline int domain_pfn_mapping(struct dmar_domain *domain, unsigned long i | |||
2230 | return __domain_mapping(domain, iov_pfn, NULL, phys_pfn, nr_pages, prot); | 2230 | return __domain_mapping(domain, iov_pfn, NULL, phys_pfn, nr_pages, prot); |
2231 | } | 2231 | } |
2232 | 2232 | ||
2233 | static void iommu_detach_dev(struct intel_iommu *iommu, u8 bus, u8 devfn) | 2233 | static void domain_context_clear_one(struct intel_iommu *iommu, u8 bus, u8 devfn) |
2234 | { | 2234 | { |
2235 | if (!iommu) | 2235 | if (!iommu) |
2236 | return; | 2236 | return; |
@@ -4551,11 +4551,11 @@ out_free_dmar: | |||
4551 | return ret; | 4551 | return ret; |
4552 | } | 4552 | } |
4553 | 4553 | ||
4554 | static int iommu_detach_dev_cb(struct pci_dev *pdev, u16 alias, void *opaque) | 4554 | static int domain_context_clear_one_cb(struct pci_dev *pdev, u16 alias, void *opaque) |
4555 | { | 4555 | { |
4556 | struct intel_iommu *iommu = opaque; | 4556 | struct intel_iommu *iommu = opaque; |
4557 | 4557 | ||
4558 | iommu_detach_dev(iommu, PCI_BUS_NUM(alias), alias & 0xff); | 4558 | domain_context_clear_one(iommu, PCI_BUS_NUM(alias), alias & 0xff); |
4559 | return 0; | 4559 | return 0; |
4560 | } | 4560 | } |
4561 | 4561 | ||
@@ -4565,13 +4565,12 @@ static int iommu_detach_dev_cb(struct pci_dev *pdev, u16 alias, void *opaque) | |||
4565 | * devices, unbinding the driver from any one of them will possibly leave | 4565 | * devices, unbinding the driver from any one of them will possibly leave |
4566 | * the others unable to operate. | 4566 | * the others unable to operate. |
4567 | */ | 4567 | */ |
4568 | static void iommu_detach_dependent_devices(struct intel_iommu *iommu, | 4568 | static void domain_context_clear(struct intel_iommu *iommu, struct device *dev) |
4569 | struct device *dev) | ||
4570 | { | 4569 | { |
4571 | if (!iommu || !dev || !dev_is_pci(dev)) | 4570 | if (!iommu || !dev || !dev_is_pci(dev)) |
4572 | return; | 4571 | return; |
4573 | 4572 | ||
4574 | pci_for_each_dma_alias(to_pci_dev(dev), &iommu_detach_dev_cb, iommu); | 4573 | pci_for_each_dma_alias(to_pci_dev(dev), &domain_context_clear_one_cb, iommu); |
4575 | } | 4574 | } |
4576 | 4575 | ||
4577 | static void dmar_remove_one_dev_info(struct dmar_domain *domain, | 4576 | static void dmar_remove_one_dev_info(struct dmar_domain *domain, |
@@ -4596,8 +4595,7 @@ static void dmar_remove_one_dev_info(struct dmar_domain *domain, | |||
4596 | spin_unlock_irqrestore(&device_domain_lock, flags); | 4595 | spin_unlock_irqrestore(&device_domain_lock, flags); |
4597 | 4596 | ||
4598 | iommu_disable_dev_iotlb(info); | 4597 | iommu_disable_dev_iotlb(info); |
4599 | iommu_detach_dev(iommu, info->bus, info->devfn); | 4598 | domain_context_clear(iommu, dev); |
4600 | iommu_detach_dependent_devices(iommu, dev); | ||
4601 | free_devinfo_mem(info); | 4599 | free_devinfo_mem(info); |
4602 | domain_detach_iommu(domain, iommu); | 4600 | domain_detach_iommu(domain, iommu); |
4603 | 4601 | ||