mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
synced 2025-10-04 08:02:24 +00:00
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>
This commit is contained in:
parent
4010b0192d
commit
c66b9906f8
@ -17,7 +17,15 @@ struct dmar_domain;
|
|||||||
struct root_entry;
|
struct root_entry;
|
||||||
|
|
||||||
extern void free_dmar_iommu(struct intel_iommu *iommu);
|
extern void free_dmar_iommu(struct intel_iommu *iommu);
|
||||||
|
|
||||||
|
#ifdef CONFIG_DMAR
|
||||||
extern int iommu_calculate_agaw(struct intel_iommu *iommu);
|
extern int iommu_calculate_agaw(struct intel_iommu *iommu);
|
||||||
|
#else
|
||||||
|
static inline int iommu_calculate_agaw(struct intel_iommu *iommu)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
extern int dmar_disabled;
|
extern int dmar_disabled;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user