From: Joerg Roedel Date: Tue, 9 Apr 2013 19:14:08 +0000 (+0200) Subject: iommu/amd: Properly initialize irq-table lock X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=197887f03daecdb3ae21bafeb4155412abad3497;p=linux-beck.git iommu/amd: Properly initialize irq-table lock Fixes a lockdep warning. Cc: stable@vger.kernel.org # >= v3.7 Reviewed-by: Shuah Khan Signed-off-by: Joerg Roedel --- diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index b05599dd2c43..f42793d1574d 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c @@ -3930,6 +3930,9 @@ static struct irq_remap_table *get_irq_table(u16 devid, bool ioapic) 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;