提交 09284b9c 编写于 作者: B Baoquan He 提交者: Joerg Roedel

iommu/amd: No need to wait iommu completion if no dte irq entry change

This is a clean up. In get_irq_table() only if DTE entry is changed
iommu_completion_wait() need be called. Otherwise no need to do it.
Signed-off-by: NBaoquan He <bhe@redhat.com>
Signed-off-by: NJoerg Roedel <jroedel@suse.de>
上级 c3db901c
...@@ -3634,7 +3634,7 @@ static struct irq_remap_table *get_irq_table(u16 devid, bool ioapic) ...@@ -3634,7 +3634,7 @@ static struct irq_remap_table *get_irq_table(u16 devid, bool ioapic)
table = irq_lookup_table[devid]; table = irq_lookup_table[devid];
if (table) if (table)
goto out; goto out_unlock;
alias = amd_iommu_alias_table[devid]; alias = amd_iommu_alias_table[devid];
table = irq_lookup_table[alias]; table = irq_lookup_table[alias];
...@@ -3648,7 +3648,7 @@ static struct irq_remap_table *get_irq_table(u16 devid, bool ioapic) ...@@ -3648,7 +3648,7 @@ static struct irq_remap_table *get_irq_table(u16 devid, bool ioapic)
/* Nothing there yet, allocate new irq remapping table */ /* Nothing there yet, allocate new irq remapping table */
table = kzalloc(sizeof(*table), GFP_ATOMIC); table = kzalloc(sizeof(*table), GFP_ATOMIC);
if (!table) if (!table)
goto out; goto out_unlock;
/* Initialize table spin-lock */ /* Initialize table spin-lock */
spin_lock_init(&table->lock); spin_lock_init(&table->lock);
...@@ -3661,7 +3661,7 @@ static struct irq_remap_table *get_irq_table(u16 devid, bool ioapic) ...@@ -3661,7 +3661,7 @@ static struct irq_remap_table *get_irq_table(u16 devid, bool ioapic)
if (!table->table) { if (!table->table) {
kfree(table); kfree(table);
table = NULL; table = NULL;
goto out; goto out_unlock;
} }
if (!AMD_IOMMU_GUEST_IR_GA(amd_iommu_guest_ir)) if (!AMD_IOMMU_GUEST_IR_GA(amd_iommu_guest_ir))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册