4 #include <linux/export.h>
12 #include <asm/iommu.h>
16 #include <asm/iommu_table.h>
25 #ifdef CONFIG_IOMMU_DEBUG
52 .init_name =
"fallback device",
59 #define PREALLOC_DMA_DEBUG_ENTRIES 32768
93 unsigned long dma_mask;
98 dma_mask = dma_alloc_coherent_mask(dev, flag);
106 page = alloc_pages_node(dev_to_node(dev), flag,
get_order(size));
111 if (addr + size > dma_mask) {
140 static __init int iommu_setup(
char *
p)
153 if (!
strncmp(p,
"noforce", 7)) {
158 if (!
strncmp(p,
"biomerge", 8)) {
172 if (!
strncmp(p,
"forcesac", 8))
174 if (!
strncmp(p,
"allowdac", 8))
178 if (!
strncmp(p,
"usedac", 6)) {
182 #ifdef CONFIG_SWIOTLB
191 #ifdef CONFIG_CALGARY_IOMMU
209 if (mask > 0xffffffff && forbid_dac > 0) {
210 dev_info(dev,
"PCI: Disallowing DAC for device\n");
237 dev_info(dev,
"Force SAC with mask %Lx\n", mask);
245 static int __init pci_iommu_init(
void)
270 if (forbid_dac == 0) {
271 dev_info(&dev->
dev,
"disabling DAC on VIA PCI bridge\n");