Date: Tue, 3 Feb 2015 00:29:59 +0000 (UTC) From: Nathan Whitehorn <nwhitehorn@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278122 - stable/10/sys/powerpc/pseries Message-ID: <201502030029.t130TxcS085348@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: nwhitehorn Date: Tue Feb 3 00:29:58 2015 New Revision: 278122 URL: https://svnweb.freebsd.org/changeset/base/278122 Log: MFC r277792: Fix bug in mapppings of multiple pages exposed by updates to the VSCSI support in QEMU. Each page of a many page mapping was getting mapped to the same physical address, which is not the desired behavior. Modified: stable/10/sys/powerpc/pseries/plpar_iommu.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/powerpc/pseries/plpar_iommu.c ============================================================================== --- stable/10/sys/powerpc/pseries/plpar_iommu.c Tue Feb 3 00:19:50 2015 (r278121) +++ stable/10/sys/powerpc/pseries/plpar_iommu.c Tue Feb 3 00:29:58 2015 (r278122) @@ -191,13 +191,13 @@ phyp_iommu_map(device_t dev, bus_dma_seg tce = trunc_page(segs[i].ds_addr); tce |= 0x3; /* read/write */ - if (papr_supports_stuff_tce) { - error = phyp_hcall(H_STUFF_TCE, window->map->iobn, - alloced, tce, allocsize/PAGE_SIZE); - } else { - for (j = 0; j < allocsize; j += PAGE_SIZE) - error = phyp_hcall(H_PUT_TCE, window->map->iobn, - alloced + j, tce + j); + for (j = 0; j < allocsize; j += PAGE_SIZE) { + error = phyp_hcall(H_PUT_TCE, window->map->iobn, + alloced + j, tce + j); + if (error < 0) { + panic("IOMMU mapping error: %d\n", error); + return (ENOMEM); + } } segs[i].ds_addr = alloced + (segs[i].ds_addr & PAGE_MASK);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201502030029.t130TxcS085348>