diff options
author | Nathan Whitehorn <nwhitehorn@FreeBSD.org> | 2013-11-12 16:14:45 +0000 |
---|---|---|
committer | Nathan Whitehorn <nwhitehorn@FreeBSD.org> | 2013-11-12 16:14:45 +0000 |
commit | acf9bb339a1c7a982615d99e6217818b9791efd1 (patch) | |
tree | 885e27844e5a37a2a062f0716cf6252856d63722 /sys/powerpc/pseries | |
parent | ea5d5118aef75546eb5edf599260286bd943d7ec (diff) | |
download | src-acf9bb339a1c7a982615d99e6217818b9791efd1.tar.gz src-acf9bb339a1c7a982615d99e6217818b9791efd1.zip |
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
Notes
Notes:
svn path=/head/; revision=258051
Diffstat (limited to 'sys/powerpc/pseries')
-rw-r--r-- | sys/powerpc/pseries/plpar_iommu.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/powerpc/pseries/plpar_iommu.c b/sys/powerpc/pseries/plpar_iommu.c index 84a905495374..e491b3ce04c6 100644 --- a/sys/powerpc/pseries/plpar_iommu.c +++ b/sys/powerpc/pseries/plpar_iommu.c @@ -115,6 +115,8 @@ phyp_iommu_set_dma_tag(device_t bus, device_t dev, bus_dma_tag_t tag) (((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, device_t dev, bus_dma_tag_t tag) 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); } /* |