diff options
author | Keshavamurthy, Anil S <anil.s.keshavamurthy@intel.com> | 2007-10-21 19:41:49 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-22 11:13:18 -0400 |
commit | ba39592764ed20cee09aae5352e603a27bf56b0d (patch) | |
tree | efe7ec88bbd4d6b08b639830352c68411a7ef7fb /include/linux/dmar.h | |
parent | f8de50eb6b085572ea773f26e066835ea3d3028b (diff) |
Intel IOMMU: Intel IOMMU driver
Actual intel IOMMU driver. Hardware spec can be found at:
http://www.intel.com/technology/virtualization
This driver sets X86_64 'dma_ops', so hook into standard DMA APIs. In this
way, PCI driver will get virtual DMA address. This change is transparent to
PCI drivers.
[akpm@linux-foundation.org: remove unneeded cast]
[akpm@linux-foundation.org: build fix]
[bunk@stusta.de: fix duplicate CONFIG_DMAR Makefile line]
Signed-off-by: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
Cc: Andi Kleen <ak@suse.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Muli Ben-Yehuda <muli@il.ibm.com>
Cc: "Siddha, Suresh B" <suresh.b.siddha@intel.com>
Cc: Arjan van de Ven <arjan@infradead.org>
Cc: Ashok Raj <ashok.raj@intel.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Christoph Lameter <clameter@sgi.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/dmar.h')
-rw-r--r-- | include/linux/dmar.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/linux/dmar.h b/include/linux/dmar.h index 8d3e0e38ca4d..7d683dc8ed1e 100644 --- a/include/linux/dmar.h +++ b/include/linux/dmar.h | |||
@@ -23,7 +23,14 @@ | |||
23 | 23 | ||
24 | #include <linux/acpi.h> | 24 | #include <linux/acpi.h> |
25 | #include <linux/types.h> | 25 | #include <linux/types.h> |
26 | #include <linux/msi.h> | ||
26 | 27 | ||
28 | #ifdef CONFIG_DMAR | ||
29 | struct intel_iommu; | ||
30 | |||
31 | /* Intel IOMMU detection and initialization functions */ | ||
32 | extern void detect_intel_iommu(void); | ||
33 | extern int intel_iommu_init(void); | ||
27 | 34 | ||
28 | extern int dmar_table_init(void); | 35 | extern int dmar_table_init(void); |
29 | extern int early_dmar_detect(void); | 36 | extern int early_dmar_detect(void); |
@@ -49,4 +56,19 @@ struct dmar_rmrr_unit { | |||
49 | int devices_cnt; /* target device count */ | 56 | int devices_cnt; /* target device count */ |
50 | }; | 57 | }; |
51 | 58 | ||
59 | #define for_each_drhd_unit(drhd) \ | ||
60 | list_for_each_entry(drhd, &dmar_drhd_units, list) | ||
61 | #define for_each_rmrr_units(rmrr) \ | ||
62 | list_for_each_entry(rmrr, &dmar_rmrr_units, list) | ||
63 | #else | ||
64 | static inline void detect_intel_iommu(void) | ||
65 | { | ||
66 | return; | ||
67 | } | ||
68 | static inline int intel_iommu_init(void) | ||
69 | { | ||
70 | return -ENODEV; | ||
71 | } | ||
72 | |||
73 | #endif /* !CONFIG_DMAR */ | ||
52 | #endif /* __DMAR_H__ */ | 74 | #endif /* __DMAR_H__ */ |