Index: sys/dev/ahci/ahci_pci.c =================================================================== --- sys/dev/ahci/ahci_pci.c +++ sys/dev/ahci/ahci_pci.c @@ -27,8 +27,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_iommu.h" - #include #include #include @@ -501,7 +499,6 @@ i++; ctlr->quirks = ahci_ids[i].quirks; -#ifdef IOMMU if (ctlr->quirks & AHCI_Q_IOMMU_BUSWIDE) { /* * The controller issues DMA requests from PCI function 1, @@ -510,7 +507,6 @@ */ bus_dma_iommu_set_buswide(dev); } -#endif /* Limit speed for my onboard JMicron external port. * It is not eSATA really, limit to SATA 1 */ Index: sys/kern/subr_bus_dma.c =================================================================== --- sys/kern/subr_bus_dma.c +++ sys/kern/subr_bus_dma.c @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include "opt_bus.h" +#include "opt_iommu.h" #include #include @@ -785,3 +786,21 @@ return; } +#ifndef IOMMU +bool bus_dma_iommu_set_buswide(device_t dev); +int bus_dma_iommu_load_ident(bus_dma_tag_t dmat, bus_dmamap_t map, + vm_paddr_t start, vm_size_t length, int flags); + +bool +bus_dma_iommu_set_buswide(device_t dev) +{ + return (false); +} + +int +bus_dma_iommu_load_ident(bus_dma_tag_t dmat, bus_dmamap_t map, + vm_paddr_t start, vm_size_t length, int flags) +{ + return (0); +} +#endif Index: sys/x86/x86/busdma_machdep.c =================================================================== --- sys/x86/x86/busdma_machdep.c +++ sys/x86/x86/busdma_machdep.c @@ -34,7 +34,6 @@ __FBSDID("$FreeBSD$"); #include "opt_acpi.h" -#include "opt_iommu.h" #include #include @@ -268,22 +267,3 @@ tc = (struct bus_dma_tag_common *)dmat; return (tc->impl->tag_destroy(dmat)); } - -#ifndef IOMMU -bool bus_dma_iommu_set_buswide(device_t dev); -int bus_dma_iommu_load_ident(bus_dma_tag_t dmat, bus_dmamap_t map, - vm_paddr_t start, vm_size_t length, int flags); - -bool -bus_dma_iommu_set_buswide(device_t dev) -{ - return (false); -} - -int -bus_dma_iommu_load_ident(bus_dma_tag_t dmat, bus_dmamap_t map, - vm_paddr_t start, vm_size_t length, int flags) -{ - return (0); -} -#endif