diff options
| author | Keshavamurthy, Anil S <[email protected]> | 2007-10-21 16:41:49 -0700 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2007-10-22 08:13:18 -0700 |
| commit | ba39592764ed20cee09aae5352e603a27bf56b0d (patch) | |
| tree | efe7ec88bbd4d6b08b639830352c68411a7ef7fb /include/linux | |
| 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.
[[email protected]: remove unneeded cast]
[[email protected]: build fix]
[[email protected]: fix duplicate CONFIG_DMAR Makefile line]
Signed-off-by: Anil S Keshavamurthy <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Muli Ben-Yehuda <[email protected]>
Cc: "Siddha, Suresh B" <[email protected]>
Cc: Arjan van de Ven <[email protected]>
Cc: Ashok Raj <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: Christoph Lameter <[email protected]>
Cc: Greg KH <[email protected]>
Signed-off-by: Adrian Bunk <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'include/linux')
| -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 @@ #include <linux/acpi.h> #include <linux/types.h> +#include <linux/msi.h> +#ifdef CONFIG_DMAR +struct intel_iommu; + +/* Intel IOMMU detection and initialization functions */ +extern void detect_intel_iommu(void); +extern int intel_iommu_init(void); extern int dmar_table_init(void); extern int early_dmar_detect(void); @@ -49,4 +56,19 @@ struct dmar_rmrr_unit { int devices_cnt; /* target device count */ }; +#define for_each_drhd_unit(drhd) \ + list_for_each_entry(drhd, &dmar_drhd_units, list) +#define for_each_rmrr_units(rmrr) \ + list_for_each_entry(rmrr, &dmar_rmrr_units, list) +#else +static inline void detect_intel_iommu(void) +{ + return; +} +static inline int intel_iommu_init(void) +{ + return -ENODEV; +} + +#endif /* !CONFIG_DMAR */ #endif /* __DMAR_H__ */ |