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.8.13~67 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d474ea53485a4a81699f503c8234610af7fb8c3c;p=thirdparty%2Fkernel%2Fstable.git iommu/amd: Properly initialize irq-table lock commit 197887f03daecdb3ae21bafeb4155412abad3497 upstream. Fixes a lockdep warning. Reviewed-by: Shuah Khan Signed-off-by: Joerg Roedel Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index 4647b50b249ca..4c867f47b53c2 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c @@ -3948,6 +3948,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;