|
@@ -82,6 +82,7 @@
|
|
|
|
|
|
static DEFINE_RWLOCK(amd_iommu_devtable_lock);
|
|
|
static DEFINE_SPINLOCK(pd_bitmap_lock);
|
|
|
+static DEFINE_SPINLOCK(iommu_table_lock);
|
|
|
|
|
|
/* List of all available dev_data structures */
|
|
|
static LLIST_HEAD(dev_data_list);
|
|
@@ -3623,7 +3624,7 @@ static struct irq_remap_table *alloc_irq_table(u16 devid, bool ioapic)
|
|
|
unsigned long flags;
|
|
|
u16 alias;
|
|
|
|
|
|
- write_lock_irqsave(&amd_iommu_devtable_lock, flags);
|
|
|
+ spin_lock_irqsave(&iommu_table_lock, flags);
|
|
|
|
|
|
iommu = amd_iommu_rlookup_table[devid];
|
|
|
if (!iommu)
|
|
@@ -3688,7 +3689,7 @@ out:
|
|
|
iommu_completion_wait(iommu);
|
|
|
|
|
|
out_unlock:
|
|
|
- write_unlock_irqrestore(&amd_iommu_devtable_lock, flags);
|
|
|
+ spin_unlock_irqrestore(&iommu_table_lock, flags);
|
|
|
|
|
|
return table;
|
|
|
}
|