diff options
author | Joerg Roedel <jroedel@suse.de> | 2015-07-22 05:58:07 -0400 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2015-08-12 10:23:36 -0400 |
commit | de7e888646466e6c32cdd41124c0164cfed4abcb (patch) | |
tree | 0c10583b6fb7bd3d540b4a433023f3efe806656a /drivers/iommu | |
parent | d160aca5276d093fc68d6ff48888586c90309d03 (diff) |
iommu/vt-d: Only call domain_remove_one_dev_info to detach old domain
There is no need to make a difference here between VM and
non-VM domains, so simplify this code here.
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu')
-rw-r--r-- | drivers/iommu/intel-iommu.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 1cb7a3eb29d3..c8d9bef776da 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c | |||
@@ -4648,10 +4648,7 @@ static int intel_iommu_attach_device(struct iommu_domain *domain, | |||
4648 | old_domain = find_domain(dev); | 4648 | old_domain = find_domain(dev); |
4649 | if (old_domain) { | 4649 | if (old_domain) { |
4650 | rcu_read_lock(); | 4650 | rcu_read_lock(); |
4651 | if (domain_type_is_vm_or_si(dmar_domain)) | 4651 | dmar_remove_one_dev_info(old_domain, dev); |
4652 | dmar_remove_one_dev_info(old_domain, dev); | ||
4653 | else | ||
4654 | domain_remove_dev_info(old_domain); | ||
4655 | rcu_read_unlock(); | 4652 | rcu_read_unlock(); |
4656 | 4653 | ||
4657 | if (!domain_type_is_vm_or_si(old_domain) && | 4654 | if (!domain_type_is_vm_or_si(old_domain) && |