CPU Cache and busdma usage in USB

Piotr Zięcik kosmo at semihalf.com
Thu Jul 9 15:21:03 UTC 2009


Wednesday 08 July 2009 12:50:56 Hans Petter Selasky napisał(a):
> By flush you mean write from CPU cache to RAM, right. And nothing else? You
> 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 for
> 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.

Full log with backtraces is here: 
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. What
> > 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).


-- 
Pozdrawiam.
Piotr Zięcik


More information about the freebsd-usb mailing list