Date: Sun, 2 Feb 2014 22:26:31 +0000 (UTC) From: Olivier Houchard <cognet@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261418 - head/sys/arm/arm Message-ID: <201402022226.s12MQVCc001092@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201402022226.s12MQVCc001092>