svn commit: r261418 - head/sys/arm/arm
Olivier Houchard
cognet at FreeBSD.org
Sun Feb 2 22:26:31 UTC 2014
Author: cognet
Date: Sun Feb 2 22:26:30 2014
New Revision: 261418
URL: http://svnweb.freebsd.org/changeset/base/261418
Log:
Invalidate cachelines for bounce pages on PREREAD too, there may still be
stale entries from a previous transfer.
Modified:
head/sys/arm/arm/busdma_machdep-v6.c
Modified: head/sys/arm/arm/busdma_machdep-v6.c
==============================================================================
--- head/sys/arm/arm/busdma_machdep-v6.c Sun Feb 2 21:44:04 2014 (r261417)
+++ head/sys/arm/arm/busdma_machdep-v6.c Sun Feb 2 22:26:30 2014 (r261418)
@@ -1220,6 +1220,17 @@ _bus_dmamap_sync(bus_dma_tag_t dmat, bus
dmat->bounce_zone->total_bounced++;
}
+ if (op & BUS_DMASYNC_PREREAD) {
+ bpage = STAILQ_FIRST(&map->bpages);
+ while (bpage != NULL) {
+ cpu_dcache_inv_range((vm_offset_t)bpage->vaddr,
+ bpage->datacount);
+ l2cache_inv_range((vm_offset_t)bpage->vaddr,
+ (vm_offset_t)bpage->busaddr,
+ bpage->datacount);
+ bpage = STAILQ_NEXT(bpage, links);
+ }
+ }
if (op & BUS_DMASYNC_POSTREAD) {
while (bpage != NULL) {
vm_offset_t startv;
More information about the svn-src-all
mailing list