Skip to content

Commit

Permalink
iommu/amd: No need to wait iommu completion if no dte irq entry change
Browse files Browse the repository at this point in the history
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: Baoquan He <bhe@redhat.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
  • Loading branch information
Baoquan He authored and Joerg Roedel committed Sep 20, 2016
1 parent c3db901 commit 09284b9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/iommu/amd_iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -3634,7 +3634,7 @@ static struct irq_remap_table *get_irq_table(u16 devid, bool ioapic)

table = irq_lookup_table[devid];
if (table)
goto out;
goto out_unlock;

alias = amd_iommu_alias_table[devid];
table = irq_lookup_table[alias];
Expand All @@ -3648,7 +3648,7 @@ static struct irq_remap_table *get_irq_table(u16 devid, bool ioapic)
/* Nothing there yet, allocate new irq remapping table */
table = kzalloc(sizeof(*table), GFP_ATOMIC);
if (!table)
goto out;
goto out_unlock;

/* Initialize table spin-lock */
spin_lock_init(&table->lock);
Expand All @@ -3661,7 +3661,7 @@ static struct irq_remap_table *get_irq_table(u16 devid, bool ioapic)
if (!table->table) {
kfree(table);
table = NULL;
goto out;
goto out_unlock;
}

if (!AMD_IOMMU_GUEST_IR_GA(amd_iommu_guest_ir))
Expand Down

0 comments on commit 09284b9

Please sign in to comment.