Skip to contentSkip to conversation

amd_iommu: initialize table->lock for lockdep

PATCH New Kyle McMartin 1 participant 1 message Mar 19, 2013 IOMMU

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 amd_iommu: initialize table->lock for lockdep

Lockdep complains about uninitialized spinlocks, squelch that by calling spin_lock_init to initialize the lockdep fields.

drivers/iommu/amd_iommu.c +2 -0
@@ -3949,6 +3949,8 @@ static struct irq_remap_table *get_irq_table(u16 devid, bool ioapic)
 	if (!table)
 		goto out;
 
+	spin_lock_init(&table->lock);
+
 	if (ioapic)
 		/* Keep the first 32 indexes free for IOAPIC interrupts */
 		table->min_index = 32;