PERFORCE change 95005 for review
John-Mark Gurney
jmg at FreeBSD.org
Tue Apr 11 17:59:27 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=95005
Change 95005 by jmg at 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;
}
}
More information about the p4-projects
mailing list