aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-01-04 04:55:02 -0500
committerIngo Molnar <mingo@elte.hu>2009-01-04 05:00:05 -0500
commitc66b9906f863696159e05890bb7123269bb9a9de (patch)
tree8aa2277b033eb8c823289575134d21180ce42e73
parent4010b0192ddf6ec7ec1b9feb9b0953692aeb7329 (diff)
intel-iommu: fix build error with INTR_REMAP=y and DMAR=n
dmar.o can be built in the CONFIG_INTR_REMAP=y case but iommu_calculate_agaw() is only available if VT-d is built as well. So create an inline version of iommu_calculate_agaw() for the !CONFIG_DMAR case. The iommu->agaw value wont be used in this case, but the code is cleaner (has less #ifdefs) if we have it around unconditionally. Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r--include/linux/dma_remapping.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/dma_remapping.h b/include/linux/dma_remapping.h
index 136f170cecc2..af1dab41674b 100644
--- a/include/linux/dma_remapping.h
+++ b/include/linux/dma_remapping.h
@@ -17,7 +17,15 @@ struct dmar_domain;
17struct root_entry; 17struct root_entry;
18 18
19extern void free_dmar_iommu(struct intel_iommu *iommu); 19extern void free_dmar_iommu(struct intel_iommu *iommu);
20
21#ifdef CONFIG_DMAR
20extern int iommu_calculate_agaw(struct intel_iommu *iommu); 22extern int iommu_calculate_agaw(struct intel_iommu *iommu);
23#else
24static inline int iommu_calculate_agaw(struct intel_iommu *iommu)
25{
26 return 0;
27}
28#endif
21 29
22extern int dmar_disabled; 30extern int dmar_disabled;
23 31