diff options
author | Baoquan He <bhe@redhat.com> | 2016-09-20 03:05:34 +0200 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2016-09-20 11:54:11 +0200 |
commit | 09284b9c4a80299b25b913c976dcaced09cc12f4 (patch) | |
tree | 29a2034b545b745ffc34525db245a91dc2648737 /drivers/iommu | |
parent | iommu/amd: Free domain id when free a domain of struct dma_ops_domain (diff) | |
download | linux-09284b9c4a80299b25b913c976dcaced09cc12f4.tar.xz linux-09284b9c4a80299b25b913c976dcaced09cc12f4.zip |
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: Baoquan He <bhe@redhat.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu')
-rw-r--r-- | drivers/iommu/amd_iommu.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index b5b117b44026..a2479d0df292 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c @@ -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)) |