xref: /openbmc/linux/arch/ia64/kernel/pci-dma.c (revision 976e3645923bdd2fe7893aae33fd7a21098bfb28)
1*b2441318SGreg Kroah-Hartman // SPDX-License-Identifier: GPL-2.0
262fdd767SFenghua Yu /*
362fdd767SFenghua Yu  * Dynamic DMA mapping support.
462fdd767SFenghua Yu  */
562fdd767SFenghua Yu 
662fdd767SFenghua Yu #include <linux/types.h>
762fdd767SFenghua Yu #include <linux/mm.h>
862fdd767SFenghua Yu #include <linux/string.h>
962fdd767SFenghua Yu #include <linux/pci.h>
1062fdd767SFenghua Yu #include <linux/module.h>
1162fdd767SFenghua Yu #include <linux/dmar.h>
1262fdd767SFenghua Yu #include <asm/iommu.h>
1362fdd767SFenghua Yu #include <linux/dma-mapping.h>
1462fdd767SFenghua Yu #include <linux/kernel.h>
1562fdd767SFenghua Yu #include <asm/page.h>
1662fdd767SFenghua Yu 
1762fdd767SFenghua Yu int no_iommu __read_mostly;
1862fdd767SFenghua Yu #ifdef CONFIG_IOMMU_DEBUG
1962fdd767SFenghua Yu int force_iommu __read_mostly = 1;
2062fdd767SFenghua Yu #else
2162fdd767SFenghua Yu int force_iommu __read_mostly;
2262fdd767SFenghua Yu #endif
2362fdd767SFenghua Yu 
pci_iommu_init(void)2462fdd767SFenghua Yu static int __init pci_iommu_init(void)
2562fdd767SFenghua Yu {
2662fdd767SFenghua Yu 	if (iommu_detected)
2762fdd767SFenghua Yu 		intel_iommu_init();
2862fdd767SFenghua Yu 
2962fdd767SFenghua Yu 	return 0;
3062fdd767SFenghua Yu }
3162fdd767SFenghua Yu 
3262fdd767SFenghua Yu /* Must execute after PCI subsystem */
3362fdd767SFenghua Yu fs_initcall(pci_iommu_init);
34