summaryrefslogtreecommitdiffstats
path: root/include/linux/dmar.h
diff options
context:
space:
mode:
authorSuresh Siddha <suresh.b.siddha@intel.com>2008-07-10 11:16:37 -0700
committerIngo Molnar <mingo@elte.hu>2008-07-12 08:44:48 +0200
commit1886e8a90a580f3ad343f2065c84c1b9e1dac9ef (patch)
tree1f0a6b536a1bb7b24585973e70ad8e1a9a076f09 /include/linux/dmar.h
parentc42d9f32443397aed2d37d37df161392e6a5862f (diff)
downloadlinux-stable-1886e8a90a580f3ad343f2065c84c1b9e1dac9ef.tar.gz
linux-stable-1886e8a90a580f3ad343f2065c84c1b9e1dac9ef.tar.bz2
linux-stable-1886e8a90a580f3ad343f2065c84c1b9e1dac9ef.zip
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 'include/linux/dmar.h')
-rw-r--r--include/linux/dmar.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/linux/dmar.h b/include/linux/dmar.h
index 56c73b847551..3ab07e425583 100644
--- a/include/linux/dmar.h
+++ b/include/linux/dmar.h
@@ -46,12 +46,14 @@ extern int intel_iommu_init(void);
extern int dmar_table_init(void);
extern int early_dmar_detect(void);
+extern int dmar_dev_scope_init(void);
extern struct list_head dmar_drhd_units;
extern struct list_head dmar_rmrr_units;
struct dmar_drhd_unit {
struct list_head list; /* list of drhd units */
+ struct acpi_dmar_header *hdr; /* ACPI header */
u64 reg_base_addr; /* register base address*/
struct pci_dev **devices; /* target device array */
int devices_cnt; /* target device count */
@@ -62,6 +64,7 @@ struct dmar_drhd_unit {
struct dmar_rmrr_unit {
struct list_head list; /* list of rmrr units */
+ struct acpi_dmar_header *hdr; /* ACPI header */
u64 base_address; /* reserved base address*/
u64 end_address; /* reserved end address */
struct pci_dev **devices; /* target devices */
@@ -72,6 +75,8 @@ struct dmar_rmrr_unit {
list_for_each_entry(drhd, &dmar_drhd_units, list)
#define for_each_rmrr_units(rmrr) \
list_for_each_entry(rmrr, &dmar_rmrr_units, list)
+
+extern int alloc_iommu(struct dmar_drhd_unit *);
#else
static inline void detect_intel_iommu(void)
{
@@ -81,6 +86,9 @@ static inline int intel_iommu_init(void)
{
return -ENODEV;
}
-
+static inline int dmar_table_init(void)
+{
+ return -ENODEV;
+}
#endif /* !CONFIG_DMAR */
#endif /* __DMAR_H__ */