]> Pileus Git - ~andy/linux/commitdiff
iommu/amd: Properly initialize irq-table lock
authorJoerg Roedel <joro@8bytes.org>
Tue, 9 Apr 2013 19:14:08 +0000 (21:14 +0200)
committerJoerg Roedel <joro@8bytes.org>
Thu, 18 Apr 2013 15:21:28 +0000 (17:21 +0200)
Fixes a lockdep warning.

Cc: stable@vger.kernel.org # >= v3.7
Reviewed-by: Shuah Khan <shuahkhan@gmail.com>
Signed-off-by: Joerg Roedel <joro@8bytes.org>
drivers/iommu/amd_iommu.c

index b05599dd2c435ac0c83e2d4490de1cca5f4ec1ca..f42793d1574d452df331463cc96baee0522382c5 100644 (file)
@@ -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;