From owner-freebsd-usb@FreeBSD.ORG Mon Jun 29 12:15:16 2009 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7EA0C1065670; Mon, 29 Jun 2009 12:15:16 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe07.swip.net [212.247.154.193]) by mx1.freebsd.org (Postfix) with ESMTP id 9B8468FC13; Mon, 29 Jun 2009 12:15:15 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=Hrwt8fWgTlIA:10 a=gg2W7PyvkLb8p4ie143lBA==:17 a=8kQB0OdkAAAA:8 a=pR-ycQP4qUUy1Qk1604A:9 a=skV1t3KLyfofAv-qceHNzmgbqzoA:4 a=9aOQ2cSd83gA:10 a=ZZKWQUrvU8IimEav:21 a=GRKjM2PgJTOlfXSK:21 Received: from [194.248.135.20] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe07.swip.net (CommuniGate Pro SMTP 5.2.13) with ESMTPA id 1265768735; Mon, 29 Jun 2009 14:15:13 +0200 From: Hans Petter Selasky To: Stanislav Sedov Date: Mon, 29 Jun 2009 14:14:45 +0200 User-Agent: KMail/1.11.4 (FreeBSD/8.0-CURRENT; KDE/4.2.4; i386; ; ) References: <200906231035.43096.kosmo@semihalf.com> <200906291337.43635.hselasky@c2i.net> <20090629161011.2a657c4b.stas@FreeBSD.org> In-Reply-To: <20090629161011.2a657c4b.stas@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200906291414.46341.hselasky@c2i.net> Cc: thompsa@freebsd.org, freebsd-arm@freebsd.org, freebsd-usb@freebsd.org Subject: Re: CPU Cache and busdma usage in USB X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2009 12:15:16 -0000 On Monday 29 June 2009 14:10:11 Stanislav Sedov wrote: > On Mon, 29 Jun 2009 13:37:41 +0200 > > Hans Petter Selasky mentioned: > > USB is currently _updating_ (!!) the PAGE offset part of "vaddr". If > > cpu_dcache_inv_range() is called with an address not starting at the > > cache line what will the cpu_dcache_inv_range() do? Will it skip to the > > next cache line? Or will it completely skip the whole cache sync > > operation?! > > Currently, the address passed to cpu_dcache_inv_range will be rounded up > to the cache line boundary and the whole line will be invalidated if the > range requested is smaller than 16KiB. Otherwise, the whole cache will > be invalidated. That maybe explains it, because USB will require rounding down the address and rounding up the length accordingly, because it uses the "BUS_DMA_KEEP_PG_OFFSET" flag. --HPS