diff options
author | Joerg Roedel <jroedel@suse.de> | 2014-05-20 17:18:25 -0400 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2014-05-26 05:28:14 -0400 |
commit | 9163b9013542a688fe4152985118a9c46e2d255d (patch) | |
tree | e5d72f371066d965c73f988350416f4fcafeede8 /drivers/iommu | |
parent | a40d4c67d7dec4e9b04e2fe1105072a843fda5a9 (diff) |
iommu/amd: Remove IOMMUv2 pasid_state_list
This list was only used for the task_exit notifier function.
Now that it is gone we can remove it.
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Tested-by: Jay Cornwall <Jay.Cornwall@amd.com>
Diffstat (limited to 'drivers/iommu')
-rw-r--r-- | drivers/iommu/amd_iommu_v2.c | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/drivers/iommu/amd_iommu_v2.c b/drivers/iommu/amd_iommu_v2.c index 09d342bf0f47..c65f3ec60bec 100644 --- a/drivers/iommu/amd_iommu_v2.c +++ b/drivers/iommu/amd_iommu_v2.c | |||
@@ -86,10 +86,6 @@ struct fault { | |||
86 | static LIST_HEAD(state_list); | 86 | static LIST_HEAD(state_list); |
87 | static spinlock_t state_lock; | 87 | static spinlock_t state_lock; |
88 | 88 | ||
89 | /* List and lock for all pasid_states */ | ||
90 | static LIST_HEAD(pasid_state_list); | ||
91 | static DEFINE_SPINLOCK(ps_lock); | ||
92 | |||
93 | static struct workqueue_struct *iommu_wq; | 89 | static struct workqueue_struct *iommu_wq; |
94 | 90 | ||
95 | /* | 91 | /* |
@@ -171,25 +167,6 @@ static void put_device_state_wait(struct device_state *dev_state) | |||
171 | free_device_state(dev_state); | 167 | free_device_state(dev_state); |
172 | } | 168 | } |
173 | 169 | ||
174 | static void link_pasid_state(struct pasid_state *pasid_state) | ||
175 | { | ||
176 | spin_lock(&ps_lock); | ||
177 | list_add_tail(&pasid_state->list, &pasid_state_list); | ||
178 | spin_unlock(&ps_lock); | ||
179 | } | ||
180 | |||
181 | static void __unlink_pasid_state(struct pasid_state *pasid_state) | ||
182 | { | ||
183 | list_del(&pasid_state->list); | ||
184 | } | ||
185 | |||
186 | static void unlink_pasid_state(struct pasid_state *pasid_state) | ||
187 | { | ||
188 | spin_lock(&ps_lock); | ||
189 | __unlink_pasid_state(pasid_state); | ||
190 | spin_unlock(&ps_lock); | ||
191 | } | ||
192 | |||
193 | /* Must be called under dev_state->lock */ | 170 | /* Must be called under dev_state->lock */ |
194 | static struct pasid_state **__get_pasid_state_ptr(struct device_state *dev_state, | 171 | static struct pasid_state **__get_pasid_state_ptr(struct device_state *dev_state, |
195 | int pasid, bool alloc) | 172 | int pasid, bool alloc) |
@@ -346,7 +323,6 @@ static void unbind_pasid(struct device_state *dev_state, int pasid) | |||
346 | if (pasid_state == NULL) | 323 | if (pasid_state == NULL) |
347 | return; | 324 | return; |
348 | 325 | ||
349 | unlink_pasid_state(pasid_state); | ||
350 | __unbind_pasid(pasid_state); | 326 | __unbind_pasid(pasid_state); |
351 | put_pasid_state_wait(pasid_state); /* Reference taken in this function */ | 327 | put_pasid_state_wait(pasid_state); /* Reference taken in this function */ |
352 | } | 328 | } |
@@ -689,8 +665,6 @@ int amd_iommu_bind_pasid(struct pci_dev *pdev, int pasid, | |||
689 | if (ret) | 665 | if (ret) |
690 | goto out_clear_state; | 666 | goto out_clear_state; |
691 | 667 | ||
692 | link_pasid_state(pasid_state); | ||
693 | |||
694 | return 0; | 668 | return 0; |
695 | 669 | ||
696 | out_clear_state: | 670 | out_clear_state: |