iommu/amd: Properly initialize irq-table lock
Fixes a lockdep warning.
Cc: stable@vger.kernel.org # >= v3.7
Reviewed-by: Shuah Khan <shuahkhan@gmail.com>
Signed-off-by: Joerg Roedel <joro@8bytes.org>
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index b05599d..f42793d 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -3930,6 +3930,9 @@
if (!table)
goto out;
+ /* Initialize table spin-lock */
+ spin_lock_init(&table->lock);
+
if (ioapic)
/* Keep the first 32 indexes free for IOAPIC interrupts */
table->min_index = 32;