From owner-freebsd-arm@FreeBSD.ORG Mon Aug 3 16:52:50 2009 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 71774106566B; Mon, 3 Aug 2009 16:52:50 +0000 (UTC) (envelope-from raj@semihalf.com) Received: from smtp.semihalf.com (smtp.semihalf.com [213.17.239.109]) by mx1.freebsd.org (Postfix) with ESMTP id 15A0D8FC18; Mon, 3 Aug 2009 16:52:49 +0000 (UTC) (envelope-from raj@semihalf.com) Received: from [10.0.0.34] (cardhu.semihalf.com [213.17.239.108]) by smtp.semihalf.com (Postfix) with ESMTPSA id 886A9C426C; Mon, 3 Aug 2009 18:50:19 +0200 (CEST) Message-Id: From: Rafal Jaworowski To: Hans Petter Selasky In-Reply-To: <200908031759.46491.hselasky@c2i.net> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v935.3) Date: Mon, 3 Aug 2009 18:52:48 +0200 References: <3E1658AF-67C6-4E61-B6E7-BEF528C3FF4D@mac.com> <20090724.233404.-399282844.imp@bsdimp.com> <8DC8C704-F84D-4A60-A11B-2F877EB903C9@semihalf.com> <200908031759.46491.hselasky@c2i.net> X-Mailer: Apple Mail (2.935.3) Cc: arm@freebsd.org, usb@freebsd.org, freebsd-current@freebsd.org Subject: Re: About the "USB Cache and busdma usage in USB" thread X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Aug 2009 16:52:51 -0000 On 2009-08-03, at 17:59, Hans Petter Selasky wrote: > 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 It's not only ARM, but some MIPS and PowerPC observe this as well; actually I'd expect any system with non-coherent DMA will suffer from this with current USB stack. > 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. This issue was discussed already: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=50307+0+archive/2009/freebsd-usb/20090628.freebsd-usb See also the beginning of this thread: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=10461+0+archive/2009/freebsd-arm/20090726.freebsd-arm Rafal