Index: head/sys/dev/acpica/acpi_pci.c =================================================================== --- head/sys/dev/acpica/acpi_pci.c +++ head/sys/dev/acpica/acpi_pci.c @@ -37,6 +37,8 @@ #include #include #include +#include +#include #include #include @@ -49,6 +51,8 @@ #include #include +#include + #include "pcib_if.h" #include "pci_if.h" @@ -456,7 +460,6 @@ } #ifdef ACPI_DMAR -bus_dma_tag_t acpi_iommu_get_dma_tag(device_t dev, device_t child); static bus_dma_tag_t acpi_pci_get_dma_tag(device_t bus, device_t child) { @@ -464,7 +467,7 @@ if (device_get_parent(child) == bus) { /* try iommu and return if it works */ - tag = acpi_iommu_get_dma_tag(bus, child); + tag = iommu_get_dma_tag(bus, child); } else tag = NULL; if (tag == NULL) Index: head/sys/dev/iommu/busdma_iommu.h =================================================================== --- head/sys/dev/iommu/busdma_iommu.h +++ head/sys/dev/iommu/busdma_iommu.h @@ -61,6 +61,4 @@ extern struct bus_dma_impl bus_dma_iommu_impl; -bus_dma_tag_t acpi_iommu_get_dma_tag(device_t dev, device_t child); - #endif Index: head/sys/dev/iommu/busdma_iommu.c =================================================================== --- head/sys/dev/iommu/busdma_iommu.c +++ head/sys/dev/iommu/busdma_iommu.c @@ -270,7 +270,7 @@ } bus_dma_tag_t -acpi_iommu_get_dma_tag(device_t dev, device_t child) +iommu_get_dma_tag(device_t dev, device_t child) { struct iommu_unit *unit; struct iommu_ctx *ctx; Index: head/sys/dev/iommu/iommu.h =================================================================== --- head/sys/dev/iommu/iommu.h +++ head/sys/dev/iommu/iommu.h @@ -232,6 +232,8 @@ 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); +bus_dma_tag_t iommu_get_dma_tag(device_t dev, device_t child); + SYSCTL_DECL(_hw_iommu); #endif /* !_SYS_IOMMU_H_ */ Index: head/sys/dev/pci/pci.c =================================================================== --- head/sys/dev/pci/pci.c +++ head/sys/dev/pci/pci.c @@ -47,6 +47,8 @@ #include #include #include +#include +#include #include #include @@ -77,6 +79,8 @@ #include #include +#include + #include "pcib_if.h" #include "pci_if.h" @@ -5680,7 +5684,6 @@ } #ifdef ACPI_DMAR -bus_dma_tag_t acpi_iommu_get_dma_tag(device_t dev, device_t child); bus_dma_tag_t pci_get_dma_tag(device_t bus, device_t dev) { @@ -5689,7 +5692,7 @@ if (device_get_parent(dev) == bus) { /* try iommu and return if it works */ - tag = acpi_iommu_get_dma_tag(bus, dev); + tag = iommu_get_dma_tag(bus, dev); } else tag = NULL; if (tag == NULL) {