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>
This commit is contained in:
committed by
Ingo Molnar
parent
c42d9f3244
commit
1886e8a90a
@ -1665,11 +1665,8 @@ int __init init_dmars(void)
|
||||
for_each_drhd_unit(drhd) {
|
||||
if (drhd->ignored)
|
||||
continue;
|
||||
iommu = alloc_iommu(drhd);
|
||||
if (!iommu) {
|
||||
ret = -ENOMEM;
|
||||
goto error;
|
||||
}
|
||||
|
||||
iommu = drhd->iommu;
|
||||
|
||||
ret = iommu_init_domains(iommu);
|
||||
if (ret)
|
||||
@ -2324,6 +2321,9 @@ int __init intel_iommu_init(void)
|
||||
if (dmar_table_init())
|
||||
return -ENODEV;
|
||||
|
||||
if (dmar_dev_scope_init())
|
||||
return -ENODEV;
|
||||
|
||||
iommu_init_mempool();
|
||||
dmar_init_reserved_ranges();
|
||||
|
||||
|
Reference in New Issue
Block a user