diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2012-07-19 04:56:10 -0400 |
---|---|---|
committer | Joerg Roedel <joerg.roedel@amd.com> | 2012-07-19 04:56:10 -0400 |
commit | 2c13d47a1a7ee8808796016c617aef25fd1d1925 (patch) | |
tree | 1c778c8ba13401cad5a847cba2c67b6a5e266810 | |
parent | 3775d4818d72081e2afa2aed2442a2b9ecfc5eab (diff) |
iommu/amd: Add missing spin_lock initialization
Add missing spin_lock initialization in
amd_iommu_bind_pasid() function and make lockdep happy
again.
Cc: stable@vger.kernel.org # >= v3.3
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
-rw-r--r-- | drivers/iommu/amd_iommu_v2.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/iommu/amd_iommu_v2.c b/drivers/iommu/amd_iommu_v2.c index 036fe9bf157e..a1f1bc876043 100644 --- a/drivers/iommu/amd_iommu_v2.c +++ b/drivers/iommu/amd_iommu_v2.c | |||
@@ -681,6 +681,8 @@ int amd_iommu_bind_pasid(struct pci_dev *pdev, int pasid, | |||
681 | 681 | ||
682 | atomic_set(&pasid_state->count, 1); | 682 | atomic_set(&pasid_state->count, 1); |
683 | init_waitqueue_head(&pasid_state->wq); | 683 | init_waitqueue_head(&pasid_state->wq); |
684 | spin_lock_init(&pasid_state->lock); | ||
685 | |||
684 | pasid_state->task = task; | 686 | pasid_state->task = task; |
685 | pasid_state->mm = get_task_mm(task); | 687 | pasid_state->mm = get_task_mm(task); |
686 | pasid_state->device_state = dev_state; | 688 | pasid_state->device_state = dev_state; |