summaryrefslogtreecommitdiffstats
path: root/drivers/iommu/intel-iommu.c
diff options
context:
space:
mode:
authorLu Baolu <baolu.lu@linux.intel.com>2019-05-25 01:41:34 -0400
committerJoerg Roedel <jroedel@suse.de>2019-05-28 04:19:12 -0400
commit0e31a7266508487bd48bfc5507a3369b797300b1 (patch)
treef0af0a02c40f88c0be2877b7cf822bf8410f7a4f /drivers/iommu/intel-iommu.c
parent4ec066c7b1476e0ca66a7acdb575627a5d1a1ee6 (diff)
iommu/vt-d: Remove startup parameter from device_def_domain_type()
It isn't used anywhere. Remove it to make code concise. Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/intel-iommu.c')
-rw-r--r--drivers/iommu/intel-iommu.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
index ebc06ee79dce..ff46227b3409 100644
--- a/drivers/iommu/intel-iommu.c
+++ b/drivers/iommu/intel-iommu.c
@@ -2946,7 +2946,7 @@ static bool device_is_rmrr_locked(struct device *dev)
2946 * - IOMMU_DOMAIN_IDENTITY: device requires an identical mapping domain 2946 * - IOMMU_DOMAIN_IDENTITY: device requires an identical mapping domain
2947 * - 0: both identity and dynamic domains work for this device 2947 * - 0: both identity and dynamic domains work for this device
2948 */ 2948 */
2949static int device_def_domain_type(struct device *dev, int startup) 2949static int device_def_domain_type(struct device *dev)
2950{ 2950{
2951 if (dev_is_pci(dev)) { 2951 if (dev_is_pci(dev)) {
2952 struct pci_dev *pdev = to_pci_dev(dev); 2952 struct pci_dev *pdev = to_pci_dev(dev);
@@ -3000,16 +3000,16 @@ static int device_def_domain_type(struct device *dev, int startup)
3000 IOMMU_DOMAIN_IDENTITY : 0; 3000 IOMMU_DOMAIN_IDENTITY : 0;
3001} 3001}
3002 3002
3003static inline int iommu_should_identity_map(struct device *dev, int startup) 3003static inline int iommu_should_identity_map(struct device *dev)
3004{ 3004{
3005 return device_def_domain_type(dev, startup) == IOMMU_DOMAIN_IDENTITY; 3005 return device_def_domain_type(dev) == IOMMU_DOMAIN_IDENTITY;
3006} 3006}
3007 3007
3008static int __init dev_prepare_static_identity_mapping(struct device *dev, int hw) 3008static int __init dev_prepare_static_identity_mapping(struct device *dev, int hw)
3009{ 3009{
3010 int ret; 3010 int ret;
3011 3011
3012 if (!iommu_should_identity_map(dev, 1)) 3012 if (!iommu_should_identity_map(dev))
3013 return 0; 3013 return 0;
3014 3014
3015 ret = domain_add_dev_info(si_domain, dev); 3015 ret = domain_add_dev_info(si_domain, dev);
@@ -4570,7 +4570,7 @@ static int device_notifier(struct notifier_block *nb,
4570 4570
4571 dmar_remove_one_dev_info(dev); 4571 dmar_remove_one_dev_info(dev);
4572 } else if (action == BUS_NOTIFY_ADD_DEVICE) { 4572 } else if (action == BUS_NOTIFY_ADD_DEVICE) {
4573 if (iommu_should_identity_map(dev, 1)) 4573 if (iommu_should_identity_map(dev))
4574 domain_add_dev_info(si_domain, dev); 4574 domain_add_dev_info(si_domain, dev);
4575 } 4575 }
4576 4576
@@ -5528,7 +5528,7 @@ static int intel_iommu_add_device(struct device *dev)
5528 domain = iommu_get_domain_for_dev(dev); 5528 domain = iommu_get_domain_for_dev(dev);
5529 dmar_domain = to_dmar_domain(domain); 5529 dmar_domain = to_dmar_domain(domain);
5530 if (domain->type == IOMMU_DOMAIN_DMA) { 5530 if (domain->type == IOMMU_DOMAIN_DMA) {
5531 if (device_def_domain_type(dev, 1) == IOMMU_DOMAIN_IDENTITY) { 5531 if (device_def_domain_type(dev) == IOMMU_DOMAIN_IDENTITY) {
5532 ret = iommu_request_dm_for_dev(dev); 5532 ret = iommu_request_dm_for_dev(dev);
5533 if (ret) { 5533 if (ret) {
5534 dmar_domain->flags |= DOMAIN_FLAG_LOSE_CHILDREN; 5534 dmar_domain->flags |= DOMAIN_FLAG_LOSE_CHILDREN;
@@ -5541,7 +5541,7 @@ static int intel_iommu_add_device(struct device *dev)
5541 return -ENODEV; 5541 return -ENODEV;
5542 } 5542 }
5543 } else { 5543 } else {
5544 if (device_def_domain_type(dev, 1) == IOMMU_DOMAIN_DMA) { 5544 if (device_def_domain_type(dev) == IOMMU_DOMAIN_DMA) {
5545 ret = iommu_request_dma_domain_for_dev(dev); 5545 ret = iommu_request_dma_domain_for_dev(dev);
5546 if (ret) { 5546 if (ret) {
5547 dmar_domain->flags |= DOMAIN_FLAG_LOSE_CHILDREN; 5547 dmar_domain->flags |= DOMAIN_FLAG_LOSE_CHILDREN;