aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iommu/amd_iommu.c
diff options
context:
space:
mode:
authorJoerg Roedel <jroedel@suse.de>2014-08-05 11:34:25 -0400
committerJoerg Roedel <jroedel@suse.de>2014-08-26 05:37:52 -0400
commitcafd2545cfd36ef6fee14f9c36870b81d3c98de5 (patch)
tree479f588a3ac2b7686479e7d890d47f080ab4307d /drivers/iommu/amd_iommu.c
parent397111abaaac259afcc48cd2fbfb78f63f27e797 (diff)
iommu/amd: Remove device binding reference count
This reference count is not used anymore, as all devices in an alias group are now attached and detached together. Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/amd_iommu.c')
-rw-r--r--drivers/iommu/amd_iommu.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index a5e6b0a2de16..989c1ae03979 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -96,7 +96,6 @@ struct iommu_dev_data {
96 struct list_head alias_list; /* Link alias-groups together */ 96 struct list_head alias_list; /* Link alias-groups together */
97 struct iommu_dev_data *alias_data;/* The alias dev_data */ 97 struct iommu_dev_data *alias_data;/* The alias dev_data */
98 struct protection_domain *domain; /* Domain the device is bound to */ 98 struct protection_domain *domain; /* Domain the device is bound to */
99 atomic_t bind; /* Domain attach reference count */
100 u16 devid; /* PCI Device ID */ 99 u16 devid; /* PCI Device ID */
101 bool iommu_v2; /* Device can make use of IOMMUv2 */ 100 bool iommu_v2; /* Device can make use of IOMMUv2 */
102 bool passthrough; /* Default for device is pt_domain */ 101 bool passthrough; /* Default for device is pt_domain */
@@ -139,7 +138,6 @@ static struct iommu_dev_data *alloc_dev_data(u16 devid)
139 INIT_LIST_HEAD(&dev_data->alias_list); 138 INIT_LIST_HEAD(&dev_data->alias_list);
140 139
141 dev_data->devid = devid; 140 dev_data->devid = devid;
142 atomic_set(&dev_data->bind, 0);
143 141
144 spin_lock_irqsave(&dev_data_list_lock, flags); 142 spin_lock_irqsave(&dev_data_list_lock, flags);
145 list_add_tail(&dev_data->dev_data_list, &dev_data_list); 143 list_add_tail(&dev_data->dev_data_list, &dev_data_list);
@@ -3179,7 +3177,6 @@ static void cleanup_domain(struct protection_domain *domain)
3179 entry = list_first_entry(&domain->dev_list, 3177 entry = list_first_entry(&domain->dev_list,
3180 struct iommu_dev_data, list); 3178 struct iommu_dev_data, list);
3181 __detach_device(entry); 3179 __detach_device(entry);
3182 atomic_set(&entry->bind, 0);
3183 } 3180 }
3184 3181
3185 write_unlock_irqrestore(&amd_iommu_devtable_lock, flags); 3182 write_unlock_irqrestore(&amd_iommu_devtable_lock, flags);