1 // SPDX-License-Identifier: GPL-2.0 2 /* 3 * Dynamic DMA mapping support. 4 */ 5 6 #include <linux/types.h> 7 #include <linux/mm.h> 8 #include <linux/string.h> 9 #include <linux/pci.h> 10 #include <linux/module.h> 11 #include <linux/dmar.h> 12 #include <asm/iommu.h> 13 #include <linux/dma-mapping.h> 14 #include <linux/kernel.h> 15 #include <asm/page.h> 16 17 int no_iommu __read_mostly; 18 #ifdef CONFIG_IOMMU_DEBUG 19 int force_iommu __read_mostly = 1; 20 #else 21 int force_iommu __read_mostly; 22 #endif 23 24 int iommu_pass_through; 25 26 static int __init pci_iommu_init(void) 27 { 28 if (iommu_detected) 29 intel_iommu_init(); 30 31 return 0; 32 } 33 34 /* Must execute after PCI subsystem */ 35 fs_initcall(pci_iommu_init); 36