> The potential issue with using unaligned buffers is related > to DMA-incoherent caches. If you have data laid out in memory > like this: > > // cache line starts here > u8 cpu_writes_here_1 [size1]; > u8 used_for_dma_read [dma_buflen]; > u8 cpu_writes_here_2 [size2]; > // cache line (maybe the Nth one) ends here > > Then on certain kinds of system, there's no guarantee that > the CPU writes won't get lost ... cpu writes to either the > beginning or end of a cache line could get lost in certain > cases, if the cache isn't properly flushed or that cache line > is modified while the DMA is enabled. > > Note that the issue comes up if "size1" is less than a cache > line (makes it resemble a DMA alignment issue) as well as > when "size2" is nonzero (doesn't look even vaguely like a > DMA alignment issue). > > Systems without such potential issues include x86 systems > and most PPC ones.
This implies that on systems that do have this issue, kmalloc must not provide two different pieces of memory in the same cache line, since DMA done to one could wack the other. Anyway, thanks for the explanation (as you can see, I finally managed to recover my lost email...), Duncan. ------------------------------------------------------- This SF.net email is sponsored by: The Definitive IT and Networking Event. Be There! NetWorld+Interop Las Vegas 2003 -- Register today! http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel