aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoerg Roedel <joro@8bytes.org>2013-04-09 21:14:08 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-05-11 13:53:51 -0700
commitd474ea53485a4a81699f503c8234610af7fb8c3c (patch)
treee3f07f51b7b5150e269b772f6aebbb24b1fd535d
parentffeae73e9f2780c7711b12b78ade0a447665117c (diff)
iommu/amd: Properly initialize irq-table lock
commit 197887f03daecdb3ae21bafeb4155412abad3497 upstream. Fixes a lockdep warning. Reviewed-by: Shuah Khan <shuahkhan@gmail.com> Signed-off-by: Joerg Roedel <joro@8bytes.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/iommu/amd_iommu.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index 4647b50b249c..4c867f47b53c 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;