Messages in this thread Patch in this message | | | Date | Tue, 10 Nov 2009 12:12:19 +0100 | From | Ingo Molnar <> | Subject | Re: [PATCH -v2 5/9] intel-iommu: convert detect_intel_iommu to use iommu_init hook |
| |
* FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> wrote:
> 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> > --- > arch/x86/kernel/pci-dma.c | 2 -- > drivers/pci/dmar.c | 4 ++++ > include/linux/dmar.h | 10 ---------- > 3 files changed, 4 insertions(+), 12 deletions(-)
FYI, the !CONFIG_DMAR case needed the fix below. (Wrt. the -ENODEV: it doesnt matter right now as we dont check the result of ->iommu_init(), but i kept it consistent with device initialization principles.)
Ingo
diff --git a/include/linux/dmar.h b/include/linux/dmar.h index d814d7d..df0cfb3 100644 --- a/include/linux/dmar.h +++ b/include/linux/dmar.h @@ -219,5 +219,8 @@ struct dmar_atsr_unit { }; extern int intel_iommu_init(void); -#endif +#else /* !CONFIG_DMAR: */ +static inline int intel_iommu_init(void) { return -ENODEV; } +#endif /* CONFIG_DMAR */ + #endif /* __DMAR_H__ */
| |