Date: Tue, 12 Nov 2013 16:14:45 +0000 (UTC) From: Nathan Whitehorn <nwhitehorn@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258051 - head/sys/powerpc/pseries Message-ID: <201311121614.rACGEje1007378@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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); } /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201311121614.rACGEje1007378>