From owner-freebsd-current@FreeBSD.ORG Mon Aug 3 15:59:51 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 02EDD106566C; Mon, 3 Aug 2009 15:59:51 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe01.swip.net [212.247.154.1]) by mx1.freebsd.org (Postfix) with ESMTP id 363E28FC18; Mon, 3 Aug 2009 15:59:49 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=uXAB73GHeBQA:10 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=k65giglMNd4q9o-90-0A:9 a=zhoo1XdpDPRzsePuYthE4ubsKKAA:4 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe01.swip.net (CommuniGate Pro SMTP 5.2.13) with ESMTPA id 234908221; Mon, 03 Aug 2009 17:59:48 +0200 From: Hans Petter Selasky To: Rafal Jaworowski , freebsd-current@freebsd.org Date: Mon, 3 Aug 2009 17:59:43 +0200 User-Agent: KMail/1.11.4 (FreeBSD/8.0-BETA2; KDE/4.2.4; i386; ; ) References: <3E1658AF-67C6-4E61-B6E7-BEF528C3FF4D@mac.com> <20090724.233404.-399282844.imp@bsdimp.com> <8DC8C704-F84D-4A60-A11B-2F877EB903C9@semihalf.com> In-Reply-To: <8DC8C704-F84D-4A60-A11B-2F877EB903C9@semihalf.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200908031759.46491.hselasky@c2i.net> Cc: arm@freebsd.org, usb@freebsd.org Subject: Re: About the "USB Cache and busdma usage in USB" thread X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Aug 2009 15:59:51 -0000 On Monday 03 August 2009 17:01:37 Rafal Jaworowski wrote: > Hans, > So how do you want to proceed with these cache sync issues? We need to > fix this before 8.0. Hi, CC'ed current: We have a case on ARM where bus_dmamap_sync() is not suffient to update the CPU cache. One reason for this is that USB needs to invalidate the same memory area multiple times. Busdma sync expects paired operation when using the PRE and POST flags, from what I understand. I do not consider this an USB issue, hence Semihalf has got the USB stack working by manually inserting CPU flush/invalidate calls into usb_pc_cpu_invalidate() and usb_pc_cpu_flush(). Their other solution however which modifies the bus_dmamap_sync() flags will break on platforms with more than 4 GByte of memory. Maybe Rafal can give a quick summar to new people at the -current list, or see previous thread on the ARM mailing list. USB needs a solution where it can call a function given a busdma mapping, preferably with an offset and length, which handles the cache sync issue and works with bounce pages on +4GB systems. --HPS