diff options
Diffstat (limited to 'drivers/iommu/intel/iommu.c')
| -rw-r--r-- | drivers/iommu/intel/iommu.c | 11 | 
1 files changed, 7 insertions, 4 deletions
| diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c index 50eb9aed47cc..a7ecd90303dc 100644 --- a/drivers/iommu/intel/iommu.c +++ b/drivers/iommu/intel/iommu.c @@ -4299,9 +4299,11 @@ static struct iommu_device *intel_iommu_probe_device(struct device *dev)  	}  	dev_iommu_priv_set(dev, info); -	ret = device_rbtree_insert(iommu, info); -	if (ret) -		goto free; +	if (pdev && pci_ats_supported(pdev)) { +		ret = device_rbtree_insert(iommu, info); +		if (ret) +			goto free; +	}  	if (sm_supported(iommu) && !dev_is_real_dma_subdevice(dev)) {  		ret = intel_pasid_alloc_table(dev); @@ -4336,7 +4338,8 @@ static void intel_iommu_release_device(struct device *dev)  	struct intel_iommu *iommu = info->iommu;  	mutex_lock(&iommu->iopf_lock); -	device_rbtree_remove(info); +	if (dev_is_pci(dev) && pci_ats_supported(to_pci_dev(dev))) +		device_rbtree_remove(info);  	mutex_unlock(&iommu->iopf_lock);  	if (sm_supported(iommu) && !dev_is_real_dma_subdevice(dev) && | 
