From: Joerg Roedel <joerg.roedel@amd.com>
To: iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org
Cc: Joerg Roedel <joerg.roedel@amd.com>
Subject: [PATCH 4/9] amd-iommu: remove support for msi-x
Date: Fri, 22 May 2009 14:15:35 +0200 [thread overview]
Message-ID: <1242994540-28799-5-git-send-email-joerg.roedel@amd.com> (raw)
In-Reply-To: <1242994540-28799-1-git-send-email-joerg.roedel@amd.com>
Impact: drop support for msi-x in amd iommu code
Current hardware uses msi instead of msi-x so this code it not necessary
and can not be tested. The best thing is to drop this code.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
---
arch/x86/kernel/amd_iommu_init.c | 44 +-------------------------------------
1 files changed, 1 insertions(+), 43 deletions(-)
diff --git a/arch/x86/kernel/amd_iommu_init.c b/arch/x86/kernel/amd_iommu_init.c
index cc99f60..feee475 100644
--- a/arch/x86/kernel/amd_iommu_init.c
+++ b/arch/x86/kernel/amd_iommu_init.c
@@ -783,46 +783,6 @@ static int __init init_iommu_all(struct acpi_table_header *table)
*
****************************************************************************/
-static int __init iommu_setup_msix(struct amd_iommu *iommu)
-{
- struct amd_iommu *curr;
- struct msix_entry entries[32]; /* only 32 supported by AMD IOMMU */
- int nvec = 0, i;
-
- for_each_iommu(curr) {
- if (curr->dev == iommu->dev) {
- entries[nvec].entry = curr->evt_msi_num;
- entries[nvec].vector = 0;
- curr->int_enabled = true;
- nvec++;
- }
- }
-
- if (pci_enable_msix(iommu->dev, entries, nvec)) {
- pci_disable_msix(iommu->dev);
- return 1;
- }
-
- for (i = 0; i < nvec; ++i) {
- int r = request_irq(entries->vector, amd_iommu_int_handler,
- IRQF_SAMPLE_RANDOM,
- "AMD IOMMU",
- NULL);
- if (r)
- goto out_free;
- }
-
- return 0;
-
-out_free:
- for (i -= 1; i >= 0; --i)
- free_irq(entries->vector, NULL);
-
- pci_disable_msix(iommu->dev);
-
- return 1;
-}
-
static int __init iommu_setup_msi(struct amd_iommu *iommu)
{
int r;
@@ -851,9 +811,7 @@ static int __init iommu_init_msi(struct amd_iommu *iommu)
if (iommu->int_enabled)
return 0;
- if (pci_find_capability(iommu->dev, PCI_CAP_ID_MSIX))
- return iommu_setup_msix(iommu);
- else if (pci_find_capability(iommu->dev, PCI_CAP_ID_MSI))
+ if (pci_find_capability(iommu->dev, PCI_CAP_ID_MSI))
return iommu_setup_msi(iommu);
return 1;
--
1.6.3.1
next prev parent reply other threads:[~2009-05-22 12:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-22 12:15 [PATCH 0/9] suspend/resume support for amd iommu Joerg Roedel
2009-05-22 12:15 ` [PATCH 1/9] amd-iommu: introduce for_each_iommu* macros Joerg Roedel
2009-05-22 12:15 ` [PATCH 2/9] amd-iommu: consolidate hardware initialization to one function Joerg Roedel
2009-05-22 12:15 ` [PATCH 3/9] amd-iommu: drop pointless iommu-loop in msi setup code Joerg Roedel
2009-05-22 12:15 ` Joerg Roedel [this message]
2009-05-22 12:15 ` [PATCH 5/9] amd-iommu: add function to disable all iommus Joerg Roedel
2009-05-22 12:15 ` [PATCH 6/9] amd-iommu: add function to flush tlb for all domains Joerg Roedel
2009-05-22 12:15 ` [PATCH 7/9] amd-iommu: add function to flush tlb for all devices Joerg Roedel
2009-05-22 12:15 ` [PATCH 8/9] amd_iommu: un __init functions required for suspend/resume Joerg Roedel
2009-05-22 12:15 ` [PATCH 9/9] amd-iommu: implement suspend/resume Joerg Roedel
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=1242994540-28799-5-git-send-email-joerg.roedel@amd.com \
--to=joerg.roedel@amd.com \
--cc=iommu@lists.linux-foundation.org \
--cc=linux-kernel@vger.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
all inboxes | Powered by JetHome®