diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2009-05-04 12:51:00 -0400 |
---|---|---|
committer | Joerg Roedel <joerg.roedel@amd.com> | 2009-05-28 12:09:18 -0400 |
commit | d91cecdd796c27df46339e80ed436a980c56fcad (patch) | |
tree | 1078aa43c7d8952773ac45cbdf8957cf0d9889ec /arch/x86/kernel/amd_iommu_init.c | |
parent | fab6afa30954a0684ef8ac1d9a606e74a6215ab6 (diff) |
amd-iommu: remove support for msi-x
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>
Diffstat (limited to 'arch/x86/kernel/amd_iommu_init.c')
-rw-r--r-- | 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 cc99f6092230..feee475e6264 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) | |||
783 | * | 783 | * |
784 | ****************************************************************************/ | 784 | ****************************************************************************/ |
785 | 785 | ||
786 | static int __init iommu_setup_msix(struct amd_iommu *iommu) | ||
787 | { | ||
788 | struct amd_iommu *curr; | ||
789 | struct msix_entry entries[32]; /* only 32 supported by AMD IOMMU */ | ||
790 | int nvec = 0, i; | ||
791 | |||
792 | for_each_iommu(curr) { | ||
793 | if (curr->dev == iommu->dev) { | ||
794 | entries[nvec].entry = curr->evt_msi_num; | ||
795 | entries[nvec].vector = 0; | ||
796 | curr->int_enabled = true; | ||
797 | nvec++; | ||
798 | } | ||
799 | } | ||
800 | |||
801 | if (pci_enable_msix(iommu->dev, entries, nvec)) { | ||
802 | pci_disable_msix(iommu->dev); | ||
803 | return 1; | ||
804 | } | ||
805 | |||
806 | for (i = 0; i < nvec; ++i) { | ||
807 | int r = request_irq(entries->vector, amd_iommu_int_handler, | ||
808 | IRQF_SAMPLE_RANDOM, | ||
809 | "AMD IOMMU", | ||
810 | NULL); | ||
811 | if (r) | ||
812 | goto out_free; | ||
813 | } | ||
814 | |||
815 | return 0; | ||
816 | |||
817 | out_free: | ||
818 | for (i -= 1; i >= 0; --i) | ||
819 | free_irq(entries->vector, NULL); | ||
820 | |||
821 | pci_disable_msix(iommu->dev); | ||
822 | |||
823 | return 1; | ||
824 | } | ||
825 | |||
826 | static int __init iommu_setup_msi(struct amd_iommu *iommu) | 786 | static int __init iommu_setup_msi(struct amd_iommu *iommu) |
827 | { | 787 | { |
828 | int r; | 788 | int r; |
@@ -851,9 +811,7 @@ static int __init iommu_init_msi(struct amd_iommu *iommu) | |||
851 | if (iommu->int_enabled) | 811 | if (iommu->int_enabled) |
852 | return 0; | 812 | return 0; |
853 | 813 | ||
854 | if (pci_find_capability(iommu->dev, PCI_CAP_ID_MSIX)) | 814 | if (pci_find_capability(iommu->dev, PCI_CAP_ID_MSI)) |
855 | return iommu_setup_msix(iommu); | ||
856 | else if (pci_find_capability(iommu->dev, PCI_CAP_ID_MSI)) | ||
857 | return iommu_setup_msi(iommu); | 815 | return iommu_setup_msi(iommu); |
858 | 816 | ||
859 | return 1; | 817 | return 1; |