aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/intel-iommu.c
diff options
context:
space:
mode:
authorSuresh Siddha <suresh.b.siddha@intel.com>2008-07-10 14:16:37 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-12 02:44:48 -0400
commit1886e8a90a580f3ad343f2065c84c1b9e1dac9ef (patch)
tree1f0a6b536a1bb7b24585973e70ad8e1a9a076f09 /drivers/pci/intel-iommu.c
parentc42d9f32443397aed2d37d37df161392e6a5862f (diff)
x64, x2apic/intr-remap: code re-structuring, to be used by both DMA and Interrupt remapping
Allocate the iommu during the parse of DMA remapping hardware definition structures. And also, introduce routines for device scope initialization which will be explicitly called during dma-remapping initialization. These will be used for enabling interrupt remapping separately from the existing DMA-remapping enabling sequence. Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> Cc: akpm@linux-foundation.org Cc: arjan@linux.intel.com Cc: andi@firstfloor.org Cc: ebiederm@xmission.com Cc: jbarnes@virtuousgeek.org Cc: steiner@sgi.com Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/pci/intel-iommu.c')
-rw-r--r--drivers/pci/intel-iommu.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c
index 4d59a6a1f4dd..218a1f357b4d 100644
--- a/drivers/pci/intel-iommu.c
+++ b/drivers/pci/intel-iommu.c
@@ -1665,11 +1665,8 @@ int __init init_dmars(void)
1665 for_each_drhd_unit(drhd) { 1665 for_each_drhd_unit(drhd) {
1666 if (drhd->ignored) 1666 if (drhd->ignored)
1667 continue; 1667 continue;
1668 iommu = alloc_iommu(drhd); 1668
1669 if (!iommu) { 1669 iommu = drhd->iommu;
1670 ret = -ENOMEM;
1671 goto error;
1672 }
1673 1670
1674 ret = iommu_init_domains(iommu); 1671 ret = iommu_init_domains(iommu);
1675 if (ret) 1672 if (ret)
@@ -2324,6 +2321,9 @@ int __init intel_iommu_init(void)
2324 if (dmar_table_init()) 2321 if (dmar_table_init())
2325 return -ENODEV; 2322 return -ENODEV;
2326 2323
2324 if (dmar_dev_scope_init())
2325 return -ENODEV;
2326
2327 iommu_init_mempool(); 2327 iommu_init_mempool();
2328 dmar_init_reserved_ranges(); 2328 dmar_init_reserved_ranges();
2329 2329