[lkml]   [2002]   [Jun]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: PCI DMA to small buffers on cache-incoherent arch
>Now at this point the driver calls pci_unmap_single or whatever. What
>is pci_unmap_single to do? If it does nothing, or does a writeback,
>we lose the DMA data. If it does an invalidate we lose the value
>written to X. Clearly, neither is correct.
>The bottom line is that we can only have one writer to any given cache
>line at a time. If a buffer is being used for DMA from a device to
>memory, the cpu MUST NOT write to any cache line that overlaps the

Note that this typically happen with network drivers, some infos in
the skbuf getting lost when they happen to share a cache line with
the data portion of the skbuf. When writing a driver specific to a
non-coherent CPU, it can be worked around by reserving enough space,
but "generic" PCI drivers are still affected.

On those architectures, the core skbuf alloc routines should probably
make sure the data portion don't share a cache line with other


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:26    [W:0.118 / U:4.436 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site