From owner-svn-src-head@freebsd.org Thu Aug 20 19:39:16 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C781C9BF990; Thu, 20 Aug 2015 19:39:16 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B89BCA0F; Thu, 20 Aug 2015 19:39:16 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t7KJdGts005444; Thu, 20 Aug 2015 19:39:16 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t7KJdG70005443; Thu, 20 Aug 2015 19:39:16 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201508201939.t7KJdG70005443@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 20 Aug 2015 19:39:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r286969 - 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.20 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: Thu, 20 Aug 2015 19:39:16 -0000 Author: ian Date: Thu Aug 20 19:39:15 2015 New Revision: 286969 URL: https://svnweb.freebsd.org/changeset/base/286969 Log: Remove code left over from the armv4 days. On armv4, cache maintenance operations always had to be aligned and sized to cache lines. On armv6 and later, cache maintenance operates on a cache line if any part of the line is referenced in the operation, so we don't need extra code to align the edges of the sync range. 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 Thu Aug 20 19:14:16 2015 (r286968) +++ head/sys/arm/arm/busdma_machdep-v6.c Thu Aug 20 19:39:15 2015 (r286969) @@ -1381,22 +1381,11 @@ _bus_dmamap_sync(bus_dma_tag_t dmat, bus */ if (op & BUS_DMASYNC_POSTREAD) { while (bpage != NULL) { - vm_offset_t startv; - vm_paddr_t startp; - int len; - - startv = bpage->vaddr &~ arm_dcache_align_mask; - startp = bpage->busaddr &~ arm_dcache_align_mask; - len = bpage->datacount; - - if (startv != bpage->vaddr) - len += bpage->vaddr & arm_dcache_align_mask; - if (len & arm_dcache_align_mask) - len = (len - - (len & arm_dcache_align_mask)) + - arm_dcache_align; - l2cache_inv_range(startv, startp, len); - cpu_dcache_inv_range(startv, len); + l2cache_inv_range((vm_offset_t)bpage->vaddr, + (vm_offset_t)bpage->busaddr, + bpage->datacount); + cpu_dcache_inv_range((vm_offset_t)bpage->vaddr, + bpage->datacount); if (bpage->datavaddr != 0) bcopy((void *)bpage->vaddr, (void *)bpage->datavaddr,