amd_iommu: initialize table->lock for lockdep
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.
Signed-off-by Kyle McMartin <[email protected]>
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 ;