From: Baoquan He <bhe@redhat.com> To: joro@8bytes.org Cc: iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, dyoung@redhat.com, xlpang@redhat.com, Vincent.Wan@amd.com Subject: [PATCH RESEND 4/4] iommu/amd: No need to wait iommu completion if no dte irq entry change Date: Tue, 20 Sep 2016 09:05:34 +0800 [thread overview] Message-ID: <20160920010534.GA11495@x1.redhat.com> (raw) In-Reply-To: <1473929453-3533-5-git-send-email-bhe@redhat.com> 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> --- drivers/iommu/amd_iommu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index b5b117b..a2479d0 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)) -- 2.5.5
WARNING: multiple messages have this Message-ID (diff)
From: Baoquan He <bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> To: joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Vincent.Wan-5C7GfCeVMHo@public.gmane.org Subject: [PATCH RESEND 4/4] iommu/amd: No need to wait iommu completion if no dte irq entry change Date: Tue, 20 Sep 2016 09:05:34 +0800 [thread overview] Message-ID: <20160920010534.GA11495@x1.redhat.com> (raw) In-Reply-To: <1473929453-3533-5-git-send-email-bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 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-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> --- drivers/iommu/amd_iommu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index b5b117b..a2479d0 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)) -- 2.5.5
next prev parent reply other threads:[~2016-09-20 1:05 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2016-09-15 8:50 [PATCH 0/4] iommu/amd: Clean up patches Baoquan He 2016-09-15 8:50 ` [PATCH 1/4] iommu/amd: clean up the cmpxchg64 invocation Baoquan He 2016-09-15 8:50 ` Baoquan He 2016-09-15 8:50 ` [PATCH 2/4] iommu/amd: Use standard bitmap operation to set bitmap Baoquan He 2016-09-15 8:50 ` Baoquan He 2016-09-15 8:50 ` [PATCH 3/4] iommu/amd: Free domain id when free a domain of struct dma_ops_domain Baoquan He 2016-09-15 8:50 ` Baoquan He 2016-09-15 8:50 ` [PATCH 4/4] iommu/amd: No need to wait iommu completion if no dte irq entry change Baoquan He 2016-09-15 8:50 ` Baoquan He 2016-09-20 1:05 ` Baoquan He [this message] 2016-09-20 1:05 ` [PATCH RESEND " Baoquan He 2016-09-20 9:56 ` Joerg Roedel 2016-09-20 10:14 ` Baoquan He 2016-09-19 14:20 ` [PATCH 0/4] iommu/amd: Clean up patches Joerg Roedel 2016-09-20 1:07 ` Baoquan He 2016-09-20 1:07 ` Baoquan He
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20160920010534.GA11495@x1.redhat.com \ --to=bhe@redhat.com \ --cc=Vincent.Wan@amd.com \ --cc=dyoung@redhat.com \ --cc=iommu@lists.linux-foundation.org \ --cc=joro@8bytes.org \ --cc=linux-kernel@vger.kernel.org \ --cc=xlpang@redhat.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.