From owner-svn-src-head@FreeBSD.ORG Sun Feb 2 22:26:31 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8A5FD32D; Sun, 2 Feb 2014 22:26:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7673215BB; Sun, 2 Feb 2014 22:26:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s12MQVgd001093; Sun, 2 Feb 2014 22:26:31 GMT (envelope-from cognet@svn.freebsd.org) Received: (from cognet@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s12MQVCc001092; Sun, 2 Feb 2014 22:26:31 GMT (envelope-from cognet@svn.freebsd.org) Message-Id: <201402022226.s12MQVCc001092@svn.freebsd.org> From: Olivier Houchard Date: Sun, 2 Feb 2014 22:26:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261418 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Feb 2014 22:26:31 -0000 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;