Call the parent bus dvmamap_unload function to clear the cache rather

than do it ourselves.
This commit is contained in:
eeh 2000-08-01 00:22:41 +00:00
parent 3094e3b89d
commit aeb88321db
1 changed files with 4 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: iommu.c,v 1.22 2000/07/07 13:10:34 mrg Exp $ */
/* $NetBSD: iommu.c,v 1.23 2000/08/01 00:22:41 eeh Exp $ */
/*
* Copyright (c) 1999, 2000 Matthew R. Green
@ -584,6 +584,9 @@ iommu_dvmamap_unload(t, is, map)
sgsize = round_page(map->dm_segs[0].ds_len +
((int)map->dm_segs[0].ds_addr & PGOFSET));
/* Flush the caches */
bus_dmamap_unload(t->_parent, map);
/* Mark the mappings as invalid. */
map->dm_mapsize = 0;
map->dm_nsegs = 0;
@ -593,7 +596,6 @@ iommu_dvmamap_unload(t, is, map)
splx(s);
if (error != 0)
printf("warning: %qd of DVMA space lost\n", (long long)sgsize);
cache_flush((caddr_t)(u_long)dvmaddr, (u_int)sgsize);
}