diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2009-11-10 05:46:16 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-11-10 06:31:36 -0500 |
commit | 9d5ce73a64be2be8112147a3e0b551ad9cd1247b (patch) | |
tree | 8593dc2ca29e95b1a25e6f677459f3fe5c68dee9 /include | |
parent | ea1b0d3945c7374849235b6ecaea1191ee1d9d50 (diff) |
x86: intel-iommu: Convert detect_intel_iommu to use iommu_init hook
This changes detect_intel_iommu() to set intel_iommu_init() to
iommu_init hook if detect_intel_iommu() finds the IOMMU.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: chrisw@sous-sol.org
Cc: dwmw2@infradead.org
Cc: joerg.roedel@amd.com
Cc: muli@il.ibm.com
LKML-Reference: <1257849980-22640-6-git-send-email-fujita.tomonori@lab.ntt.co.jp>
[ -v2: build fix for the !CONFIG_DMAR case ]
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/dmar.h | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/include/linux/dmar.h b/include/linux/dmar.h index 4a2b162c256a..5de4c9e5856d 100644 --- a/include/linux/dmar.h +++ b/include/linux/dmar.h | |||
@@ -208,16 +208,9 @@ struct dmar_atsr_unit { | |||
208 | u8 include_all:1; /* include all ports */ | 208 | u8 include_all:1; /* include all ports */ |
209 | }; | 209 | }; |
210 | 210 | ||
211 | /* Intel DMAR initialization functions */ | ||
212 | extern int intel_iommu_init(void); | 211 | extern int intel_iommu_init(void); |
213 | #else | 212 | #else /* !CONFIG_DMAR: */ |
214 | static inline int intel_iommu_init(void) | 213 | static inline int intel_iommu_init(void) { return -ENODEV; } |
215 | { | 214 | #endif /* CONFIG_DMAR */ |
216 | #ifdef CONFIG_INTR_REMAP | 215 | |
217 | return dmar_dev_scope_init(); | ||
218 | #else | ||
219 | return -ENODEV; | ||
220 | #endif | ||
221 | } | ||
222 | #endif /* !CONFIG_DMAR */ | ||
223 | #endif /* __DMAR_H__ */ | 216 | #endif /* __DMAR_H__ */ |