svn commit: r258051 - head/sys/powerpc/pseries
Nathan Whitehorn
nwhitehorn at FreeBSD.org
Tue Nov 12 16:14:45 UTC 2013
Author: nwhitehorn
Date: Tue Nov 12 16:14:45 2013
New Revision: 258051
URL: http://svnweb.freebsd.org/changeset/base/258051
Log:
Actually add IOMMU domain to the list of known mappings. This fixes a bug
where multiple devices in the same IOMMU domain would be allocated
conflicting mappings unless they also shared a DMA tag.
MFC after: 3 days
Modified:
head/sys/powerpc/pseries/plpar_iommu.c
Modified: head/sys/powerpc/pseries/plpar_iommu.c
==============================================================================
--- head/sys/powerpc/pseries/plpar_iommu.c Tue Nov 12 16:08:23 2013 (r258050)
+++ head/sys/powerpc/pseries/plpar_iommu.c Tue Nov 12 16:14:45 2013 (r258051)
@@ -115,6 +115,8 @@ phyp_iommu_set_dma_tag(device_t bus, dev
(((uint64_t)(dmawindow[dma_acells + 1]) << 32) |
dmawindow[dma_acells + 2]);
+ if (bootverbose)
+ device_printf(dev, "Mapping IOMMU domain %#x\n", dmawindow[0]);
window->map = NULL;
SLIST_FOREACH(i, &iommu_map_head, entries) {
if (i->iobn == dmawindow[0]) {
@@ -134,6 +136,7 @@ phyp_iommu_set_dma_tag(device_t bus, dev
window->map->vmem = vmem_create("IOMMU mappings", PAGE_SIZE,
trunc_page(VMEM_ADDR_MAX) - PAGE_SIZE, PAGE_SIZE, 0,
M_BESTFIT | M_NOWAIT);
+ SLIST_INSERT_HEAD(&iommu_map_head, window->map, entries);
}
/*
More information about the svn-src-all
mailing list