From: Joerg Roedel Date: Tue, 9 Apr 2013 19:14:08 +0000 (+0200) Subject: iommu/amd: Properly initialize irq-table lock X-Git-Tag: v3.10-rc1~80^2^2~9 X-Git-Url: http://pileus.org/git/?a=commitdiff_plain;h=197887f03daecdb3ae21bafeb4155412abad3497;p=~andy%2Flinux 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 b05599dd2c4..f42793d1574 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;