Date: Mon, 29 Jun 2009 14:14:45 +0200 From: Hans Petter Selasky <hselasky@c2i.net> To: Stanislav Sedov <stas@freebsd.org> Cc: thompsa@freebsd.org, freebsd-arm@freebsd.org, freebsd-usb@freebsd.org Subject: Re: CPU Cache and busdma usage in USB Message-ID: <200906291414.46341.hselasky@c2i.net> In-Reply-To: <20090629161011.2a657c4b.stas@FreeBSD.org> References: <200906231035.43096.kosmo@semihalf.com> <200906291337.43635.hselasky@c2i.net> <20090629161011.2a657c4b.stas@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Monday 29 June 2009 14:10:11 Stanislav Sedov wrote: > On Mon, 29 Jun 2009 13:37:41 +0200 > > Hans Petter Selasky <hselasky@c2i.net> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906291414.46341.hselasky>