Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 09284b9c authored by Baoquan He's avatar Baoquan He Committed by Joerg Roedel
Browse files

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: default avatarBaoquan He <bhe@redhat.com>
Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent c3db901c
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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];
@@ -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);
@@ -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))