[PATCH 09/10] x86/VT-d: Make Intel VT-d IOMMU use IOMMU_INIT_* macros.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Konrad Rzeszutek Wilk
Date: Thursday, August 26, 2010 - 10:58 am

We utilize the IOMMU_INIT macros to create this dependency:

               [null]
                 |
       [pci_xen_swiotlb_detect]
                 |
       [pci_swiotlb_detect_override]
                 |
       [pci_swiotlb_detect_4gb]
                 |
         +-------+--------+---------------------+
        /                  \                     \
[detect_calgary]    [gart_iommu_hole_init]   [detect_intel_iommu]
                            |
                    [amd_iommu_detect]

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
CC: H. Peter Anvin <hpa@zytor.com>
CC: Fujita Tomonori <fujita.tomonori@lab.ntt.co.jp>
CC: Jesse Barnes <jbarnes@virtuousgeek.org>
CC: David Woodhouse <David.Woodhouse@intel.com>
CC: Len Brown <len.brown@intel.com>
CC: Chris Wright <chrisw@sous-sol.org>
CC: Yinghai Lu <yinghai@kernel.org>
---
 drivers/pci/dmar.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/pci/dmar.c b/drivers/pci/dmar.c
index 5fa64ea..4ef56a0 100644
--- a/drivers/pci/dmar.c
+++ b/drivers/pci/dmar.c
@@ -36,6 +36,7 @@
 #include <linux/tboot.h>
 #include <linux/dmi.h>
 #include <linux/slab.h>
+#include <asm/iommu_table.h>
 
 #define PREFIX "DMAR: "
 
@@ -724,7 +725,7 @@ int __init detect_intel_iommu(void)
 	early_acpi_os_unmap_memory(dmar_tbl, dmar_tbl_size);
 	dmar_tbl = NULL;
 
-	return (ret ? 1 : -ENODEV);
+	return ret ? 1 : -ENODEV;
 }
 
 
@@ -1457,3 +1458,4 @@ int __init dmar_ir_support(void)
 		return 0;
 	return dmar->flags & 0x1;
 }
+IOMMU_INIT_POST(detect_intel_iommu);
-- 
1.7.0.1

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC PATCH v2] Modularize IOMMUs detection/init for X86, Konrad Rzeszutek Wilk, (Thu Aug 26, 10:57 am)
[PATCH 01/10] x86/iommu: Add IOMMU_INIT macros, .iommu_tab ..., Konrad Rzeszutek Wilk, (Thu Aug 26, 10:57 am)
[PATCH 02/10] x86/iommu: Make all IOMMU's detection routin ..., Konrad Rzeszutek Wilk, (Thu Aug 26, 10:57 am)
[PATCH 08/10] x86/GART/AMD-VI: Make AMD GART and IOMMU use ..., Konrad Rzeszutek Wilk, (Thu Aug 26, 10:58 am)
[PATCH 09/10] x86/VT-d: Make Intel VT-d IOMMU use IOMMU_IN ..., Konrad Rzeszutek Wilk, (Thu Aug 26, 10:58 am)
[PATCH 10/10] x86/iommu: Utilize the IOMMU_INIT macros fun ..., Konrad Rzeszutek Wilk, (Thu Aug 26, 10:58 am)
[tip:x86/iommu] x86, iommu: Add IOMMU_INIT macros, .iommu_ ..., tip-bot for Konrad R ..., (Thu Aug 26, 4:27 pm)
[tip:x86/iommu] x86, iommu: Make all IOMMU's detection rou ..., tip-bot for Konrad R ..., (Thu Aug 26, 4:28 pm)
[tip:x86/iommu] x86, GART/AMD-VI: Make AMD GART and IOMMU ..., tip-bot for Konrad R ..., (Thu Aug 26, 4:30 pm)
[tip:x86/iommu] x86, VT-d: Make Intel VT-d IOMMU use IOMMU ..., tip-bot for Konrad R ..., (Thu Aug 26, 4:30 pm)
[tip:x86/iommu] x86, iommu: Utilize the IOMMU_INIT macros ..., tip-bot for Konrad R ..., (Thu Aug 26, 4:31 pm)
Re: [PATCH 01/10] x86/iommu: Add IOMMU_INIT macros, .iommu ..., Konrad Rzeszutek Wilk, (Fri Aug 27, 7:38 am)
[PATCH] x86: Adding comments about .iommu_table and its ne ..., Konrad Rzeszutek Wilk, (Fri Aug 27, 11:19 am)
[tip:x86/iommu] x86, doc: Adding comments about .iommu_tab ..., tip-bot for Konrad R ..., (Fri Aug 27, 6:54 pm)
Re: [PATCH 09/10] x86/VT-d: Make Intel VT-d IOMMU use IOMM ..., Konrad Rzeszutek Wilk, (Tue Sep 7, 12:07 pm)