Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Apr 2006 17:59:26 GMT
From:      John-Mark Gurney <jmg@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 95005 for review
Message-ID:  <200604111759.k3BHxQu1050542@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=95005

Change 95005 by jmg@jmg_arlene on 2006/04/11 17:58:39

	add in the offset, and add the offset to the length before rounding
	up so we get the entire mapping unmapped...

Affected files ...

.. //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/hviommu.c#11 edit

Differences ...

==== //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/hviommu.c#11 (text+ko) ====

@@ -244,8 +244,8 @@
 	    ("%s: va 0x%lx not in DVMA space", __func__, (u_long)va));
 	KASSERT(va + len >= va,
 	    ("%s: va 0x%lx + len 0x%lx wraps", __func__, (long)va, (long)len));
+	len = round_page(len + (va & IO_PAGE_MASK));
 	va = trunc_io_page(va);
-	len = round_page(len);
 	while (len > 0) {
 		if ((error = hvio_iommu_demap(him->him_handle,
 		    VA_TO_TSBID(him, va), len >> IO_PAGE_SHIFT, &demapped))) {
@@ -306,7 +306,7 @@
 	struct bus_dmamap_res *r;
 
 	SLIST_FOREACH(r, &map->dm_reslist, dr_link) {
-		hviommu_remove(him, BDR_START(r), r->dr_used);
+		hviommu_remove(him, BDR_START(r) + r->dr_offset, r->dr_used);
 		r->dr_used = 0;
 	}
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200604111759.k3BHxQu1050542>