From owner-freebsd-arm@FreeBSD.ORG Thu Jul 9 15:21:02 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8E4B81065674; Thu, 9 Jul 2009 15:21:02 +0000 (UTC) (envelope-from kosmo@semihalf.com) Received: from smtp.semihalf.com (smtp.semihalf.com [213.17.239.109]) by mx1.freebsd.org (Postfix) with ESMTP id 40FC88FC1A; Thu, 9 Jul 2009 15:21:02 +0000 (UTC) (envelope-from kosmo@semihalf.com) Received: from [10.0.0.5] (cardhu.semihalf.com [213.17.239.108]) by smtp.semihalf.com (Postfix) with ESMTPSA id 92FACC3AAA; Thu, 9 Jul 2009 17:20:00 +0200 (CEST) From: Piotr =?iso-8859-2?q?Zi=EAcik?= Organization: Semihalf To: Hans Petter Selasky Date: Thu, 9 Jul 2009 17:21:00 +0200 User-Agent: PLD Linux KMail/1.9.10 References: <200906231035.43096.kosmo@semihalf.com> <200907081216.40100.kosmo@semihalf.com> <200907081250.58151.hselasky@c2i.net> In-Reply-To: <200907081250.58151.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200907091721.01272.kosmo@semihalf.com> Cc: freebsd-arm@freebsd.org, thompsa@freebsd.org, freebsd-usb@freebsd.org Subject: Re: CPU Cache and busdma usage in USB 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: Thu, 09 Jul 2009 15:21:03 -0000 Wednesday 08 July 2009 12:50:56 Hans Petter Selasky napisa=B3(a): > By flush you mean write from CPU cache to RAM, right. And nothing else? Y= ou > don't mean discard CPU cache by "flush" ??? Yes. By flush I mean write all valid and modified cache lines to RAM. > > However looking into logs which I have sent you yesterdat I see one > > difference which may be significant. My patch changes Invalidate into > > Writeback Invalidate. In original code if driver write something to > > memory and then invalidate cache > > If that is the case I'm very surprised. Could you make another printout f= or > me. Compile the kernel with KDB, and add a call to "kdb_backtrace()" in > bus_dmamap_sync() before printing out the writeback and/or invalidate, so > that I can see the backtrace. > > > , the write will be lost. > > I'm aware about that. =46ull log with backtraces is here:=20 http://people.freebsd.org/~raj/logs/usb-cache.log > > With my patch after > > change will be written to memory and then cache will be invalidated. Wh= at > > do you think ? > > You are absoultely sure that your USB code is indentical to the now stock > 8- current USB code, and that there are no integration issues lurking? > I am using current from 2009.06.15. In later versions is bug in ARM pmap causing segmentation fault in ehci atatch code (for more details loot at http://www.nabble.com/pmap-problem-in-FreeBSD-current-td24352351.html). =2D-=20 Pozdrawiam. Piotr Zi=EAcik