summaryrefslogtreecommitdiff
path: root/drivers/iommu/intel-iommu.c
diff options
context:
space:
mode:
authorLu Baolu <baolu.lu@linux.intel.com>2019-05-25 13:41:34 +0800
committerJoerg Roedel <jroedel@suse.de>2019-05-28 10:19:12 +0200
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)
* - IOMMU_DOMAIN_IDENTITY: device requires an identical mapping domain
* - 0: both identity and dynamic domains work for this device
*/
-static int device_def_domain_type(struct device *dev, int startup)
+static int device_def_domain_type(struct device *dev)
{
if (dev_is_pci(dev)) {
struct pci_dev *pdev = to_pci_dev(dev);
@@ -3000,16 +3000,16 @@ static int device_def_domain_type(struct device *dev, int startup)
IOMMU_DOMAIN_IDENTITY : 0;
}
-static inline int iommu_should_identity_map(struct device *dev, int startup)
+static inline int iommu_should_identity_map(struct device *dev)
{
- return device_def_domain_type(dev, startup) == IOMMU_DOMAIN_IDENTITY;
+ return device_def_domain_type(dev) == IOMMU_DOMAIN_IDENTITY;
}
static int __init dev_prepare_static_identity_mapping(struct device *dev, int hw)
{
int ret;
- if (!iommu_should_identity_map(dev, 1))
+ if (!iommu_should_identity_map(dev))
return 0;
ret = domain_add_dev_info(si_domain, dev);
@@ -4570,7 +4570,7 @@ static int device_notifier(struct notifier_block *nb,
dmar_remove_one_dev_info(dev);
} else if (action == BUS_NOTIFY_ADD_DEVICE) {
- if (iommu_should_identity_map(dev, 1))
+ if (iommu_should_identity_map(dev))
domain_add_dev_info(si_domain, dev);
}
@@ -5528,7 +5528,7 @@ static int intel_iommu_add_device(struct device *dev)
domain = iommu_get_domain_for_dev(dev);
dmar_domain = to_dmar_domain(domain);
if (domain->type == IOMMU_DOMAIN_DMA) {
- if (device_def_domain_type(dev, 1) == IOMMU_DOMAIN_IDENTITY) {
+ if (device_def_domain_type(dev) == IOMMU_DOMAIN_IDENTITY) {
ret = iommu_request_dm_for_dev(dev);
if (ret) {
dmar_domain->flags |= DOMAIN_FLAG_LOSE_CHILDREN;
@@ -5541,7 +5541,7 @@ static int intel_iommu_add_device(struct device *dev)
return -ENODEV;
}
} else {
- if (device_def_domain_type(dev, 1) == IOMMU_DOMAIN_DMA) {
+ if (device_def_domain_type(dev) == IOMMU_DOMAIN_DMA) {
ret = iommu_request_dma_domain_for_dev(dev);
if (ret) {
dmar_domain->flags |= DOMAIN_FLAG_LOSE_CHILDREN;