From: Joerg Roedel <joro@8bytes.org>
To: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
hpa@zytor.com, x86@kernel.org, Joerg Roedel <joro@8bytes.org>,
Jiang Liu <jiang.liu@linux.intel.com>,
Borislav Petkov <bp@alien8.de>
Cc: linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org,
Joerg Roedel <jroedel@suse.de>
Subject: [PATCH 1/5] iommu/vt-d: Allocate IRQ remapping data structures only for all IOMMUs
Date: Mon, 15 Dec 2014 16:13:20 +0100 [thread overview]
Message-ID: <1418656404-28575-2-git-send-email-joro@8bytes.org> (raw)
In-Reply-To: <1418656404-28575-1-git-send-email-joro@8bytes.org>
From: Joerg Roedel <jroedel@suse.de>
IRQ remapping is only supported when all IOMMUs in the
system support it. So check if all IOMMUs in the system
support IRQ remapping before doing the allocations.
Signed-off-by: Joerg Roedel <jroedel@suse.de>
---
drivers/iommu/intel_irq_remapping.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/iommu/intel_irq_remapping.c b/drivers/iommu/intel_irq_remapping.c
index ff35b03..3ef63b8 100644
--- a/drivers/iommu/intel_irq_remapping.c
+++ b/drivers/iommu/intel_irq_remapping.c
@@ -568,14 +568,16 @@ static int __init intel_prepare_irq_remapping(void)
goto error;
}
- for_each_iommu(iommu, drhd) {
+ /* First make sure all IOMMUs support IRQ remapping */
+ for_each_iommu(iommu, drhd)
if (!ecap_ir_support(iommu->ecap))
- continue;
+ goto error;
- /* Do the allocations early */
+ /* Do the allocations early */
+ for_each_iommu(iommu, drhd)
if (intel_setup_irq_remapping(iommu))
goto error;
- }
+
return 0;
error:
intel_cleanup_irq_remapping();
--
1.9.1
next prev parent reply other threads:[~2014-12-15 15:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-15 15:13 [PATCH 0/5] Fix Intel IRQ remapping initialization order Joerg Roedel
2014-12-15 15:13 ` Joerg Roedel [this message]
2014-12-15 15:13 ` [PATCH 2/5] iommu/vt-d: Don't check for ecap_ir_support in intel_irq_remapping_supported Joerg Roedel
2014-12-15 15:13 ` [PATCH 3/5] iommu/vt-d: Move supported-checks to intel_prepare_irq_remapping() Joerg Roedel
2014-12-15 15:13 ` [PATCH 4/5] iommu/amd: Check for irq-remap support amd_iommu_prepare() Joerg Roedel
2014-12-15 15:13 ` [PATCH 5/5] iommu, x86, apic: Remove irq_remapping_supported() Joerg Roedel
2014-12-15 15:30 ` [PATCH 0/5] Fix Intel IRQ remapping initialization order Jiang Liu
2014-12-15 19:54 ` Thomas Gleixner
2014-12-16 1:45 ` Jiang Liu
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=1418656404-28575-2-git-send-email-joro@8bytes.org \
--to=joro@8bytes.org \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=iommu@lists.linux-foundation.org \
--cc=jiang.liu@linux.intel.com \
--cc=jroedel@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox